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

Unified Diff: third_party/WebKit/Source/core/html/HTMLSelectElement.cpp

Issue 2511923002: <select>: ignore modified keydown events in some cases (Closed)
Patch Set: tests Created 4 years, 1 month 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 | « third_party/WebKit/LayoutTests/fast/forms/select/ignore-keydown-with-modifiers.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
index 9cb94478f0dbf20b4a3373cde5fa07bc6e09c7b4..ba5a8848427ccbfe1b80301a07c28367f6e47dcc 100644
--- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
@@ -1287,6 +1287,11 @@ void HTMLSelectElement::menuListDefaultEventHandler(Event* event) {
!isSpatialNavigationEnabled(document().frame()))
return;
+ int ignoreModifiers = PlatformEvent::ShiftKey | PlatformEvent::CtrlKey |
+ PlatformEvent::AltKey | PlatformMouseEvent::MetaKey;
+ if (keyEvent->modifiers() & ignoreModifiers)
+ return;
+
const String& key = keyEvent->key();
bool handled = true;
const ListItems& listItems = this->listItems();
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/select/ignore-keydown-with-modifiers.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698