Webview iframe overflow

Felix Chan picture Felix Chan · Sep 20, 2010 · Viewed 12.7k times · Source

I'm currently building a web app in android. My app runs in a webview, and loads third-party contents through iframes. The iframe size is fixed and supposed not to be changed by the content loaded.

In desktop Chrome browser, it works fine and the overflow part of loaded content can be scrolled via scrollbars. However, in android webview, the iframe tends to resize itself based on the contents loaded, which leads to a mess of the page layout.

Has anyone else encountered the same problem?

Answer

Felix Chan picture Felix Chan · Oct 4, 2010

I found out a way to avoid this nasty problem. I've disabled the scrolling bar of iframe, and use iscroll in the application instead. This scrolling bar is nearly the same as the original one, though slower on my HTC Magic phone.