Loading core/java/android/webkit/WebView.java +9 −4 Original line number Diff line number Diff line Loading @@ -4599,6 +4599,8 @@ public class WebView extends AbsoluteLayout if (isEnterActionKey(keyCode)) { switchOutDrawHistory(); boolean wantsKeyEvents = nativeCursorNodePointer() == 0 || nativeCursorWantsKeyEvents(); if (event.getRepeatCount() == 0) { if (mSelectingText) { return true; // discard press if copy in progress Loading @@ -4609,10 +4611,10 @@ public class WebView extends AbsoluteLayout // Already checked mNativeClass, so we do not need to check it // again. nativeRecordButtons(hasFocus() && hasWindowFocus(), true, true); return true; if (!wantsKeyEvents) return true; } // Bubble up the key event as WebView doesn't handle it return false; if (!wantsKeyEvents) return false; } if (keyCode != KeyEvent.KEYCODE_SHIFT_LEFT Loading Loading @@ -4771,12 +4773,15 @@ public class WebView extends AbsoluteLayout } clearTextEntry(); nativeShowCursorTimed(); if (!mCallbackProxy.uiOverrideUrlLoading(nativeCursorText())) { if (mCallbackProxy.uiOverrideUrlLoading(nativeCursorText())) { return true; } if (nativeCursorNodePointer() != 0 && !nativeCursorWantsKeyEvents()) { mWebViewCore.sendMessage(EventHub.CLICK, data.mFrame, nativeCursorNodePointer()); } return true; } } // TODO: should we pass all the keys to DOM or check the meta tag if (nativeCursorWantsKeyEvents() || true) { Loading Loading
core/java/android/webkit/WebView.java +9 −4 Original line number Diff line number Diff line Loading @@ -4599,6 +4599,8 @@ public class WebView extends AbsoluteLayout if (isEnterActionKey(keyCode)) { switchOutDrawHistory(); boolean wantsKeyEvents = nativeCursorNodePointer() == 0 || nativeCursorWantsKeyEvents(); if (event.getRepeatCount() == 0) { if (mSelectingText) { return true; // discard press if copy in progress Loading @@ -4609,10 +4611,10 @@ public class WebView extends AbsoluteLayout // Already checked mNativeClass, so we do not need to check it // again. nativeRecordButtons(hasFocus() && hasWindowFocus(), true, true); return true; if (!wantsKeyEvents) return true; } // Bubble up the key event as WebView doesn't handle it return false; if (!wantsKeyEvents) return false; } if (keyCode != KeyEvent.KEYCODE_SHIFT_LEFT Loading Loading @@ -4771,12 +4773,15 @@ public class WebView extends AbsoluteLayout } clearTextEntry(); nativeShowCursorTimed(); if (!mCallbackProxy.uiOverrideUrlLoading(nativeCursorText())) { if (mCallbackProxy.uiOverrideUrlLoading(nativeCursorText())) { return true; } if (nativeCursorNodePointer() != 0 && !nativeCursorWantsKeyEvents()) { mWebViewCore.sendMessage(EventHub.CLICK, data.mFrame, nativeCursorNodePointer()); } return true; } } // TODO: should we pass all the keys to DOM or check the meta tag if (nativeCursorWantsKeyEvents() || true) { Loading