Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(692)

Unified Diff: Source/core/html/forms/TextFieldInputType.cpp

Issue 218683010: Using alt and down key to open datalist using keyboard (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/forms/number/number-appearance-keyboard.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/TextFieldInputType.cpp
diff --git a/Source/core/html/forms/TextFieldInputType.cpp b/Source/core/html/forms/TextFieldInputType.cpp
index 041d0307d823880aa98a8326103e359f9742e37a..a21e5f7f6c085c63c1cd1e0124b6727bf26d6e7a 100644
--- a/Source/core/html/forms/TextFieldInputType.cpp
+++ b/Source/core/html/forms/TextFieldInputType.cpp
@@ -206,11 +206,16 @@ void TextFieldInputType::handleKeydownEventForSpinButton(KeyboardEvent* event)
if (element().isDisabledOrReadOnly())
return;
const String& key = event->keyIdentifier();
- if (key == "Up")
+ if (key == "Up") {
spinButtonStepUp();
- else if (key == "Down")
+ } else if (key == "Down" && !event->altKey()) {
spinButtonStepDown();
- else
+ } else if (key == "Down" && event->altKey()) {
+ if (Chrome* chrome = this->chrome()) {
+ chrome->client().handleKeyboardEventOnTextField(element(), *event);
keishi 2014/04/02 08:38:01 I think if we return early without calling event->
+ return;
+ }
+ } else
return;
event->setDefaultHandled();
}
« no previous file with comments | « LayoutTests/fast/forms/number/number-appearance-keyboard.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698