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