Android 4.1+ (Javascript browser): how to disable zooming/scaling on rotation? -


here meta tag:

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

it works disable user zooming/scaling when in landscape mode. however, when starting in portrait mode, or when user rotates @ least once, zooming re-enabled.

i tried this, (1) orientationchange event doesn't fire when starting in portrait mode , (2) doesn't anyway.

addevent (window, 'orientationchange', function (evt) {  var viewportmeta = document.queryselector('meta[name="viewport"]')  if (viewportmeta) {   viewportmeta.content = "initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,width=device-width,height=device-height,target-densitydpi=device-dpi,user-scalable=no"  } }) 

how can disable zooming/scaling entirely on android browsers 4.1 , up?

note: issue samsung's default android browser.

this might have been fixed in 4.2.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -