Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1cc2420d authored by Leon Scroggins's avatar Leon Scroggins
Browse files

Bring up the WebTextView when pressing a key on textfield.

The old code put the textfield in focus, and resulted in editing
the text semi-appropriately, but now we actually bring up the
WebTextView so that we properly handle the arrow keys, as well
as any substitution that is necessary.  This fixes
http://b/issue?id=1918883
parent fa03cded
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -3190,7 +3190,16 @@ public class WebView extends AbsoluteLayout
        }

        if (nativeCursorWantsKeyEvents() && !nativeCursorMatchesFocus()) {
            // This message will put the node in focus, for the DOM's notion
            // of focus
            mWebViewCore.sendMessage(EventHub.CLICK);
            if (nativeCursorIsTextInput()) {
                // This will bring up the WebTextView and put it in focus, for
                // our view system's notion of focus
                rebuildWebTextView();
                // Now we need to pass the event to it
                return mWebTextView.onKeyDown(keyCode, event);
            }
        }

        // TODO: should we pass all the keys to DOM or check the meta tag