[TIMOB-10603] iOS: When rotate webview from portrait to landscape font size is getting large
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-03-27T08:54:38.000+0000 |
Affected Version/s | Release 2.1.1 |
Fix Version/s | Release 3.0.2 |
Components | iOS |
Labels | api |
Reporter | Surajit Biswas |
Assignee | Shameer Jan |
Created | 2012-08-21T01:22:54.000+0000 |
Updated | 2017-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();
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
Closing ticket as the issue cannot be reproduced.