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

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: Test changes and avoid early return for key handling 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
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..64fda8150473dc9d643d9889b7fce2e8e448f668 100644
--- a/Source/core/html/forms/TextFieldInputType.cpp
+++ b/Source/core/html/forms/TextFieldInputType.cpp
@@ -206,11 +206,14 @@ 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())
keishi 2014/04/02 11:15:38 I meant something like this. I tried it and it see
Habib Virji 2014/04/02 12:27:26 Done.
+ chrome->client().handleKeyboardEventOnTextField(element(), *event);
+ } else
return;
event->setDefaultHandled();
}

Powered by Google App Engine
This is Rietveld 408576698