Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9536] Android: WebView: The html of the webview changes zoom level after device rotation

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-03-19T06:09:09.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sRelease 3.0.2
ComponentsAndroid
Labelsapi, qe-and060112
ReporterSatyam Sekhri
Assigneejithinpv
Created2012-06-14T04:41:16.000+0000
Updated2017-03-17T18:39:13.000+0000

Description

On Android Tab device, the html in the webview changes zoom level after device rotation from portrait to landscape and back to portrait orientation This is not a regression. The issue occurs as far as 1.8.2 The issue occurs only on Android Tab. The behavior was not seen on Galaxy Nexus (V4.0.2) and Motorola Milestone (V2.2) Steps to Reproduce: 1. Create application with the code below 2. Run app on Android Tab with device in portrait mode. 3. Rotate device to landscape mode 4. Again rotate the device back to portrait mode Actual: After Step 4, the zoom level of the html changes. Refer to attached screenshot for Webview_beforeRotate and Webview_afterRotate Expected: The rotation of device should not change the zoom level of webview
var _window = Ti.UI.createWindow();
_window.backgroundColor = 'white';
var loremIpsum = "<html><body>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec " + "faucibus vulputate lorem ac suscipit. Ut sit amet felis a metus mollis egestas at ac erat. Sed nec " + "urna urna, nec posuere justo. Cras nec malesuada orci. Donec interdum, elit vel consequat lacinia, " + "dui est convallis sem, nec lobortis nibh magna ac metus. Morbi sapien tellus, aliquet in convallis " + "in, viverra sit amet justo. Cras vitae erat vitae erat blandit porttitor ac faucibus libero. Mauris " + "sollicitudin, risus sit amet luctus consequat, lectus lorem sagittis sapien, at eleifend eros felis " + "eu elit. Mauris ut nibh leo, vel tempus sem. Vestibulum ante ipsum primis in faucibus orci luctus " + "et ultrices posuere cubilia Curae; Suspendisse eu lacus at ligula venenatis vestibulum.</body></html>";
		var webview = Ti.UI.createWebView();

		webview.html = loremIpsum;
		_window.add(webview);
		_window.open();

Attachments

FileDateSize
Webview_afterRotate2012-06-14T04:41:16.000+000035295
Webview_beforeRotate2012-06-14T04:41:16.000+000065343

Comments

  1. jithinpv 2013-03-19

    Issue does not reproduces with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Device: Samsung galaxy s duos Android version: 4.0.4 jithinpv
  2. Lee Morris 2017-03-17

    Closing ticket as the issue cannot be reproduced.

JSON Source