ChildBrowser Android plugin for PhoneGap - browser doesn't close until page is fully loaded

StackOverflow https://stackoverflow.com/questions/11506064

  •  21-06-2021
  •  | 
  •  

質問

I'm using the latest version of ChildBrowser with PhoneGap 1.8.1 (Android). If I launch a browser window and then touch the "x" to close the window BEFORE the page is fully loaded (in this case espn.com) the window does not close and instead becomes impossible to close. The strange thing is that when I first touch the "x" you can see a transparent closing/minification of the window occurring, but the main browser window still stays in place. Any ideas?

役に立ちましたか?

解決

Try wrapping your call to childBrowser.showWebPage() in a .setTimeout(). That sometimes fixes weirdnesses like this, though I've never seen this issue with ChildBrowser.

window.setTimeout( function () {
    window.plugins.childBrowser.showWebPage( url );
}, 1 );
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top