mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 02:12:58 +08:00
CB-1409: Clicking the menu button crashes Jellybean
This commit is contained in:
parent
a29340523f
commit
a42f095cef
@ -1001,10 +1001,10 @@ public class DroidGap extends Activity implements CordovaInterface {
|
||||
public boolean onKeyUp(int keyCode, KeyEvent event)
|
||||
{
|
||||
//Determine if the focus is on the current view or not
|
||||
if(appView.getHitTestResult().getType() == WebView.HitTestResult.EDIT_TEXT_TYPE &&
|
||||
keyCode == KeyEvent.KEYCODE_BACK)
|
||||
{
|
||||
return appView.onKeyUp(keyCode, event);
|
||||
if (appView.getHitTestResult() != null &&
|
||||
appView.getHitTestResult().getType() == WebView.HitTestResult.EDIT_TEXT_TYPE &&
|
||||
keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
return appView.onKeyUp(keyCode, event);
|
||||
}
|
||||
else
|
||||
return super.onKeyUp(keyCode, event);
|
||||
|
Loading…
Reference in New Issue
Block a user