@@ -5555,7 +5555,7 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {
55555555 return false ;
55565556 }
55575557
5558- if (keyCode == KeyEvent . KEYCODE_DPAD_CENTER ) {
5558+ if (isEnterActionKey ( keyCode ) ) {
55595559 switchOutDrawHistory ();
55605560 boolean wantsKeyEvents = nativeCursorNodePointer () == 0
55615561 || nativeCursorWantsKeyEvents ();
@@ -5704,33 +5704,35 @@ public boolean onKeyUp(int keyCode, KeyEvent event) {
57045704 return true ; // discard press if copy in progress
57055705 }
57065706
5707- // perform the single click
5708- Rect visibleRect = sendOurVisibleRect ();
5709- // Note that sendOurVisibleRect calls viewToContent, so the
5710- // coordinates should be in content coordinates.
5711- if (!nativeCursorIntersects (visibleRect )) {
5712- return false ;
5713- }
5714- WebViewCore .CursorData data = cursorData ();
5715- mWebViewCore .sendMessage (EventHub .SET_MOVE_MOUSE , data );
5716- playSoundEffect (SoundEffectConstants .CLICK );
5717- if (nativeCursorIsTextInput ()) {
5718- rebuildWebTextView ();
5719- centerKeyPressOnTextField ();
5720- if (inEditingMode ()) {
5721- mWebTextView .setDefaultSelection ();
5707+ if (!sDisableNavcache ) {
5708+ // perform the single click
5709+ Rect visibleRect = sendOurVisibleRect ();
5710+ // Note that sendOurVisibleRect calls viewToContent, so the
5711+ // coordinates should be in content coordinates.
5712+ if (!nativeCursorIntersects (visibleRect )) {
5713+ return false ;
5714+ }
5715+ WebViewCore .CursorData data = cursorData ();
5716+ mWebViewCore .sendMessage (EventHub .SET_MOVE_MOUSE , data );
5717+ playSoundEffect (SoundEffectConstants .CLICK );
5718+ if (nativeCursorIsTextInput ()) {
5719+ rebuildWebTextView ();
5720+ centerKeyPressOnTextField ();
5721+ if (inEditingMode ()) {
5722+ mWebTextView .setDefaultSelection ();
5723+ }
5724+ return true ;
5725+ }
5726+ clearTextEntry ();
5727+ nativeShowCursorTimed ();
5728+ if (mCallbackProxy .uiOverrideUrlLoading (nativeCursorText ())) {
5729+ return true ;
5730+ }
5731+ if (nativeCursorNodePointer () != 0 && !nativeCursorWantsKeyEvents ()) {
5732+ mWebViewCore .sendMessage (EventHub .CLICK , data .mFrame ,
5733+ nativeCursorNodePointer ());
5734+ return true ;
57225735 }
5723- return true ;
5724- }
5725- clearTextEntry ();
5726- nativeShowCursorTimed ();
5727- if (mCallbackProxy .uiOverrideUrlLoading (nativeCursorText ())) {
5728- return true ;
5729- }
5730- if (nativeCursorNodePointer () != 0 && !nativeCursorWantsKeyEvents ()) {
5731- mWebViewCore .sendMessage (EventHub .CLICK , data .mFrame ,
5732- nativeCursorNodePointer ());
5733- return true ;
57345736 }
57355737 }
57365738
0 commit comments