@@ -5592,7 +5592,7 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {
55925592 return false ;
55935593 }
55945594
5595- if (keyCode == KeyEvent . KEYCODE_DPAD_CENTER ) {
5595+ if (isEnterActionKey ( keyCode ) ) {
55965596 switchOutDrawHistory ();
55975597 boolean wantsKeyEvents = nativeCursorNodePointer () == 0
55985598 || nativeCursorWantsKeyEvents ();
@@ -5741,33 +5741,35 @@ public boolean onKeyUp(int keyCode, KeyEvent event) {
57415741 return true ; // discard press if copy in progress
57425742 }
57435743
5744- // perform the single click
5745- Rect visibleRect = sendOurVisibleRect ();
5746- // Note that sendOurVisibleRect calls viewToContent, so the
5747- // coordinates should be in content coordinates.
5748- if (!nativeCursorIntersects (visibleRect )) {
5749- return false ;
5750- }
5751- WebViewCore .CursorData data = cursorData ();
5752- mWebViewCore .sendMessage (EventHub .SET_MOVE_MOUSE , data );
5753- playSoundEffect (SoundEffectConstants .CLICK );
5754- if (nativeCursorIsTextInput ()) {
5755- rebuildWebTextView ();
5756- centerKeyPressOnTextField ();
5757- if (inEditingMode ()) {
5758- mWebTextView .setDefaultSelection ();
5744+ if (!sDisableNavcache ) {
5745+ // perform the single click
5746+ Rect visibleRect = sendOurVisibleRect ();
5747+ // Note that sendOurVisibleRect calls viewToContent, so the
5748+ // coordinates should be in content coordinates.
5749+ if (!nativeCursorIntersects (visibleRect )) {
5750+ return false ;
5751+ }
5752+ WebViewCore .CursorData data = cursorData ();
5753+ mWebViewCore .sendMessage (EventHub .SET_MOVE_MOUSE , data );
5754+ playSoundEffect (SoundEffectConstants .CLICK );
5755+ if (nativeCursorIsTextInput ()) {
5756+ rebuildWebTextView ();
5757+ centerKeyPressOnTextField ();
5758+ if (inEditingMode ()) {
5759+ mWebTextView .setDefaultSelection ();
5760+ }
5761+ return true ;
5762+ }
5763+ clearTextEntry ();
5764+ nativeShowCursorTimed ();
5765+ if (mCallbackProxy .uiOverrideUrlLoading (nativeCursorText ())) {
5766+ return true ;
5767+ }
5768+ if (nativeCursorNodePointer () != 0 && !nativeCursorWantsKeyEvents ()) {
5769+ mWebViewCore .sendMessage (EventHub .CLICK , data .mFrame ,
5770+ nativeCursorNodePointer ());
5771+ return true ;
57595772 }
5760- return true ;
5761- }
5762- clearTextEntry ();
5763- nativeShowCursorTimed ();
5764- if (mCallbackProxy .uiOverrideUrlLoading (nativeCursorText ())) {
5765- return true ;
5766- }
5767- if (nativeCursorNodePointer () != 0 && !nativeCursorWantsKeyEvents ()) {
5768- mWebViewCore .sendMessage (EventHub .CLICK , data .mFrame ,
5769- nativeCursorNodePointer ());
5770- return true ;
57715773 }
57725774 }
57735775
0 commit comments