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

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

Issue 1311013012: date/time inputs should not handle keyboard events if they aren't focused. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update *-open-picker-with-f4-key.html Created 5 years, 3 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/resources/picker-common.js ('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/BaseMultipleFieldsDateAndTimeInputType.cpp
diff --git a/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp b/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp
index a9b9736ebde606906117d7964baf111f19e93395..35bfcbe6e39a0918b837f282f5184f7aded09304 100644
--- a/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp
+++ b/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp
@@ -432,6 +432,8 @@ void BaseMultipleFieldsDateAndTimeInputType::requiredAttributeChanged()
void BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent(KeyboardEvent* event)
{
+ if (!element().focused())
+ return;
if (m_pickerIndicatorIsVisible
&& ((event->keyIdentifier() == "Down" && event->getModifierState("Alt")) || (LayoutTheme::theme().shouldOpenPickerWithF4Key() && event->keyIdentifier() == "F4"))) {
if (PickerIndicatorElement* element = pickerIndicatorElement())
« no previous file with comments | « LayoutTests/fast/forms/resources/picker-common.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698