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
This commit is contained in:
Leon Scroggins
2009-06-16 10:10:28 -04:00
parent fa03cded35
commit 1cc2420d0d

View File

@@ -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