Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10603] iOS: When rotate webview from portrait to landscape font size is getting large

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-03-27T08:54:38.000+0000
Affected Version/sRelease 2.1.1
Fix Version/sRelease 3.0.2
ComponentsiOS
Labelsapi
ReporterSurajit Biswas
AssigneeShameer Jan
Created2012-08-21T01:22:54.000+0000
Updated2017-03-21T21:30:12.000+0000

Description

I have a sample application which open a webview and the web view is showing one html content. When I rotate web view from portrait to landscape font size of the web view content is getting enlarged and when coming back to the portrait then font size is also reset to the original size. It is happening only in iPhone and in android it is working fine. +Source Code+

var win = Ti.UI.createWindow();
var DETAIL_VIEW_HTML_START = "<html><head><meta name=\"viewport\" content=\"user-scalable=0\"/><STYLE TYPE=\"text/css\">\n<!--\nBODY\n{\nfont-size:10pt;\nfont-family:Helvetica;\n}\n-->\n</STYLE></head><body>"
var DETAIL_VIEW_HTML_END = "</body></html>"
var webview = Titanium.UI.createWebView({
	left : 0,
	width : '100%',
	font : {
		fontSize : 13,
		fontFamily : 'Helvetica Neue',
		fontWeight : 'bold'
	},
	bottom : 0,
	autoDetect : [Ti.UI.AUTODETECT_NONE],
	html : DETAIL_VIEW_HTML_START + "Sample code for webview font size changed. Please open <a href=\"http:\/\/www.google.com\">Google<\/a> to check." + DETAIL_VIEW_HTML_END
});
win.add(webview);
win.open();

Comments

  1. Shameer Jan 2013-03-27

    Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
  2. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced.

JSON Source