cordova - iFrame Changes window.innerHeight / window.innerWidth on Android + PhoneGap -
i'm creating app using phonegap android. 1 of pages in app contains iframe (with local content) larger rest of pages (this single-page app).
the problem i've run once iframe page viewed, window.innerheight , window.innerwidth javascript objects change values match iframe's width/height causing rest of 'pages' display incorrectly not same size.
this persists after remove iframe dom.
has run or has idea of workaround?
first, sure there bug here !
i had same issue , resolved, here how. changed iframes & images width 100% or less wider window.innerwidth.
here corresponding haxejs code:
resizenodechildrentag(_contentcontainer,"iframe"); resizenodechildrentag(_contentcontainer,"img"); private function resizenodechildrentag(node:htmldom, tagname:string):void { var tagnodes:htmlcollection<htmldom> = node.getelementsbytagname(tagname); // nodes given tag name (i in 0...tagnodes.length) { if(tagnodes[i].clientwidth > lib.window.innerwidth) tagnodes[i].setattribute("width", "96%"); tagnodes[i].setattribute("height", ""); } } }
Comments
Post a Comment