cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Vorpahl (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-13455) Reverting CB-12015 causes viewport issues on Android
Date Tue, 17 Oct 2017 16:45:01 GMT

     [ https://issues.apache.org/jira/browse/CB-13455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tyler Vorpahl updated CB-13455:
-------------------------------
    Description: 
CB-12015 added the following two lines:
# settings.setUseWideViewPort(true);
# settings.setLoadWithOverviewMode(true);

To initWebViewSettings() method in SystemWebViewEngine.java

Using the following viewport tags in our index.html of our application, we have not had any
issues with Android.

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,
minimum-scale=1.0, user-scalable=no">

Since CB-12939, reverting the change in CB-12015 has caused our app to not properly fit the
viewport. 

This has been observed in a Motorolla X 37 and Samsung Galaxy S7.
Mozilla/5.0 (Linux; Android 6.0; XT1095 Build/MPES24.49-18-7) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/61.0.3163.98 Mobile Safari/537.36

The defect causes the screen to be moveable within the viewport, allowing the user to pan
the page around where this was not observed prior to CB-12015 being reverted as a result of
CB-12939.

https://developer.android.com/reference/android/webkit/WebSettings.html

setUseWideViewPort
void setUseWideViewPort (boolean use)

This should be set to true otherwise WebView will ignore the meta tag causing undesired effects
on the application.

Thanks!

Related: 
https://stackoverflow.com/questions/44923541/setting-viewport-width-is-ignored-on-cordova-7
https://fetch-info.blogspot.com/2015/06/include-viewport-settings-in-cordova-if.html
https://stackoverflow.com/questions/22161421/viewport-meta-tag-ignored-in-android-4-4-webview

  was:
CB-12015 added the following two lines:
# settings.setUseWideViewPort(true);
# settings.setLoadWithOverviewMode(true);

To initWebViewSettings() method in SystemWebViewEngine.java

Using the following viewport tags in our index.html of our application, we have not had any
issues with Android.

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,
minimum-scale=1.0, user-scalable=no">

Since CB-12939, reverting the change in CB-12015 has caused our app to not properly fit the
viewport. 

This has been observed in a Motorolla X 37 and Samsung Galaxy S7.
Mozilla/5.0 (Linux; Android 6.0; XT1095 Build/MPES24.49-18-7) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/61.0.3163.98 Mobile Safari/537.36

The defect causes the screen to be moveable within the viewport, allowing the user to pan
the page around where this was not observed prior to CB-12015 being reverted as a result of
CB-12939.

>From my understanding, settings.setUseWideViewPort(true) must be set to true otherwise
WebView will ignore the meta tag.

Thanks!

Related: 
https://stackoverflow.com/questions/44923541/setting-viewport-width-is-ignored-on-cordova-7
https://fetch-info.blogspot.com/2015/06/include-viewport-settings-in-cordova-if.html
https://stackoverflow.com/questions/22161421/viewport-meta-tag-ignored-in-android-4-4-webview


> Reverting CB-12015 causes viewport issues on Android
> ----------------------------------------------------
>
>                 Key: CB-13455
>                 URL: https://issues.apache.org/jira/browse/CB-13455
>             Project: Apache Cordova
>          Issue Type: Bug
>         Environment:     <engine name="android" spec="^6.2.3" />    
>     <platform name="android">
>         <content src="index.html" />
>         <allow-intent href="market:*" />
>         <preference name="fullscreen" value="false" />
>         <preference name="android-windowSoftInputMode" value="adjustPan" />
>         <preference name="AndroidPersistentFileLocation" value="Internal" />
>         <preference name="android-minSdkVersion" value="16" />
>         <preference name="android-targetSdkVersion" value="25" />
>         <icon density="ldpi" src="../images/android/ldpi/ic_launcher.png" />
>         <icon density="mdpi" src="../images/android/mdpi/ic_launcher.png" />
>         <icon density="hdpi" src="../images/android/hdpi/ic_launcher.png" />
>         <icon density="xhdpi" src="../images/android/xhdpi/ic_launcher.png" />
>         <icon density="xxhdpi" src="../images/android/xxhdpi/ic_launcher.png" />
>         <splash density="land-ldpi" src="../images/android/ldpi/splash_land.png" />
>         <splash density="land-mdpi" src="../images/android/mdpi/splash_land.png" />
>         <splash density="land-hdpi" src="../images/android/hdpi/splash_land.png" />
>         <splash density="land-xhdpi" src="../images/android/xhdpi/splash_land.png"
/>
>         <splash density="land-xxhdpi" src="../images/android/xxhdpi/splash_land.png"
/>
>         <splash density="port-ldpi" src="../images/android/ldpi/splash_port.png" />
>         <splash density="port-mdpi" src="../images/android/mdpi/splash_port.png" />
>         <splash density="port-hdpi" src="../images/android/hdpi/splash_port.png" />
>         <splash density="port-xhdpi" src="../images/android/xhdpi/splash_port.png"
/>
>         <splash density="port-xxhdpi" src="../images/android/xxhdpi/splash_port.png"
/>
>         <preference name="SplashMaintainAspectRatio" value="true" />
>     </platform>
>            Reporter: Tyler Vorpahl
>            Priority: Minor
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> CB-12015 added the following two lines:
> # settings.setUseWideViewPort(true);
> # settings.setLoadWithOverviewMode(true);
> To initWebViewSettings() method in SystemWebViewEngine.java
> Using the following viewport tags in our index.html of our application, we have not had
any issues with Android.
> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,
minimum-scale=1.0, user-scalable=no">
> Since CB-12939, reverting the change in CB-12015 has caused our app to not properly fit
the viewport. 
> This has been observed in a Motorolla X 37 and Samsung Galaxy S7.
> Mozilla/5.0 (Linux; Android 6.0; XT1095 Build/MPES24.49-18-7) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/61.0.3163.98 Mobile Safari/537.36
> The defect causes the screen to be moveable within the viewport, allowing the user to
pan the page around where this was not observed prior to CB-12015 being reverted as a result
of CB-12939.
> https://developer.android.com/reference/android/webkit/WebSettings.html
> setUseWideViewPort
> void setUseWideViewPort (boolean use)
> This should be set to true otherwise WebView will ignore the meta tag causing undesired
effects on the application.
> Thanks!
> Related: 
> https://stackoverflow.com/questions/44923541/setting-viewport-width-is-ignored-on-cordova-7
> https://fetch-info.blogspot.com/2015/06/include-viewport-settings-in-cordova-if.html
> https://stackoverflow.com/questions/22161421/viewport-meta-tag-ignored-in-android-4-4-webview



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message