Do not bring up the soft keyboard when clicking on a plugin
Since we have a way to bring up the soft keyboard manually
(holding down the menu key), and trying to bring it up
using our existing call results in a crash, only bring it
up when the click is on a textfield/textarea.
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp
index a17847c..6260d7e 100644
--- a/WebKit/android/nav/WebView.cpp
+++ b/WebKit/android/nav/WebView.cpp
@@ -814,16 +814,15 @@
setNavBounds(WebCore::IntRect(rx, ry, 1, 1));
root->setCursor(const_cast<CachedFrame*>(frame),
const_cast<CachedNode*>(result));
- bool newNodeWantsKeyEvents = result->wantsKeyEvents();
CachedNodeType type = result->type();
- if (type == NORMAL_CACHEDNODETYPE || newNodeWantsKeyEvents) {
+ if (type == NORMAL_CACHEDNODETYPE) {
sendMotionUp(
frame ? (WebCore::Frame*) frame->framePointer() : 0,
result ? (WebCore::Node*) result->nodePointer() : 0, rx, ry,
slop);
}
viewInvalidate();
- if (newNodeWantsKeyEvents) {
+ if (result->isTextField() || result->isTextArea()) {
rebuildWebTextView();
displaySoftKeyboard();
} else {