Fix for CB-1960, we now check to see if any view is on the WebView, since they won't always be custom

This commit is contained in:
Joe Bowser 2012-12-04 09:40:57 -08:00
parent c0ee593c10
commit 8a19769a47

View File

@ -1008,8 +1008,10 @@ public class DroidGap extends Activity implements CordovaInterface {
@Override
public boolean onKeyUp(int keyCode, KeyEvent event)
{
//Get whatever has focus!
View childView = appView.getFocusedChild();
//Determine if the focus is on the current view or not
if (appView.getHitTestResult() != null &&
if (appView.getHitTestResult() != null && childView == null &&
appView.getHitTestResult().getType() == WebView.HitTestResult.EDIT_TEXT_TYPE &&
(keyCode == KeyEvent.KEYCODE_BACK || keyCode == KeyEvent.KEYCODE_MENU)) {
return appView.onKeyUp(keyCode, event);