You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Gabriele Mondada (JIRA)" <ji...@apache.org> on 2013/04/28 15:36:15 UTC
[jira] [Created] (CB-3293) some CordovaWebView constructors do not
initialize the web client correctly
Gabriele Mondada created CB-3293:
------------------------------------
Summary: some CordovaWebView constructors do not initialize the web client correctly
Key: CB-3293
URL: https://issues.apache.org/jira/browse/CB-3293
Project: Apache Cordova
Issue Type: Bug
Components: Android
Affects Versions: 2.6.0
Environment: CordovaWebView embedded in an android app
Reporter: Gabriele Mondada
Assignee: Joe Bowser
The CordovaWebView constructor used by classic phonegap apps initializes the web client as following:
this.setWebChromeClient(new CordovaChromeClient(this.cordova, this));
this.initWebViewClient(this.cordova);
Some constructors (I guess those that pretty nobody use) miss this initialization. Here are these constructors:
public CordovaWebView(Context context)
public CordovaWebView(Context context, AttributeSet attrs, int defStyle)
Proposed patch:
--- a/src/org/apache/cordova/CordovaWebView.java
+++ b/src/org/apache/cordova/CordovaWebView.java
@@ -135,6 +135,8 @@
{
Log.d(TAG, "Your activity must implement CordovaInterface to work");
}
+ this.setWebChromeClient(new CordovaChromeClient(this.cordova, this));
+ this.initWebViewClient(this.cordova);
this.loadConfiguration();
this.setup();
}
@@ -180,6 +182,7 @@
Log.d(TAG, "Your activity must implement CordovaInterface to work");
}
this.setWebChromeClient(new CordovaChromeClient(this.cordova, this));
+ this.initWebViewClient(this.cordova);
this.loadConfiguration();
this.setup();
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira