Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[BlackBerry] Use form state to determine the VKB enter key.

https://bugs.webkit.org/show_bug.cgi?id=94239

Reviewed by Rob Buis.

PR 188234.

If the enter key for the VKB is not explicitly set, use
submit if we are in a single line input and a default
button exists for the form.

Reviewed Internally by Gen Mak.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::setElementFocused):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information...
commit 5b6af832c3859be334d9350c0bc6c9b696ff1c61 1 parent 609e1d5
@mfenton mfenton authored
View
18 Source/WebKit/blackberry/ChangeLog
@@ -1,3 +1,21 @@
+2012-08-16 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Use form state to determine the VKB enter key.
+ https://bugs.webkit.org/show_bug.cgi?id=94239
+
+ Reviewed by Rob Buis.
+
+ PR 188234.
+
+ If the enter key for the VKB is not explicitly set, use
+ submit if we are in a single line input and a default
+ button exists for the form.
+
+ Reviewed Internally by Gen Mak.
+
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::setElementFocused):
+
2012-08-16 Konrad Piascik <kpiascik@rim.com>
[BlackBerry] Reload valid page from Error Page keeps history ViewState and zoom.
View
8 Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
@@ -818,6 +818,14 @@ void InputHandler::setElementFocused(Element* element)
VirtualKeyboardType keyboardType = keyboardTypeAttribute(element);
VirtualKeyboardEnterKeyType enterKeyType = keyboardEnterKeyTypeAttribute(element);
+ if (enterKeyType == VKBEnterKeyNotSet && type != InputTypeTextArea) {
+ if (element->isFormControlElement()) {
+ const HTMLFormControlElement* formElement = static_cast<const HTMLFormControlElement*>(element);
+ if (formElement->form() && formElement->form()->defaultButton())
+ enterKeyType = VKBEnterKeySubmit;
+ }
+ }
+
FocusLog(LogLevelInfo, "InputHandler::setElementFocused, Type=%d, Style=%d, Keyboard Type=%d, Enter Key=%d", type, m_currentFocusElementTextEditMask, keyboardType, enterKeyType);
m_webPage->m_client->inputFocusGained(type, m_currentFocusElementTextEditMask, keyboardType, enterKeyType);
Please sign in to comment.
Something went wrong with that request. Please try again.