CB-3766: Javascript uses loadUrl, not loadUrlIntoView, which is only for documents

This commit is contained in:
Joe Bowser 2013-06-12 09:33:52 -07:00
parent e2a090bbba
commit a021adb7fd

View File

@ -806,7 +806,7 @@ public class CordovaWebView extends WebView {
{
// Send destroy event to JavaScript
// Since baseUrl is set in loadUrlIntoView, if user hit Back button before loadUrl was called, we'll get an NPE on baseUrl (CB-2458)
this.loadUrlIntoView("javascript:try{cordova.require('cordova/channel').onDestroy.fire();}catch(e){console.log('exception firing destroy event from native');};");
this.loadUrl("javascript:try{cordova.require('cordova/channel').onDestroy.fire();}catch(e){console.log('exception firing destroy event from native');};");
// Load blank page so that JavaScript onunload is called
this.loadUrl("about:blank");