mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 20:33:07 +08:00
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:
parent
c0ee593c10
commit
8a19769a47
@ -1008,8 +1008,10 @@ public class DroidGap extends Activity implements CordovaInterface {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onKeyUp(int keyCode, KeyEvent event)
|
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
|
//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 &&
|
appView.getHitTestResult().getType() == WebView.HitTestResult.EDIT_TEXT_TYPE &&
|
||||||
(keyCode == KeyEvent.KEYCODE_BACK || keyCode == KeyEvent.KEYCODE_MENU)) {
|
(keyCode == KeyEvent.KEYCODE_BACK || keyCode == KeyEvent.KEYCODE_MENU)) {
|
||||||
return appView.onKeyUp(keyCode, event);
|
return appView.onKeyUp(keyCode, event);
|
||||||
|
Loading…
Reference in New Issue
Block a user