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

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

Issue 16184002: REGRESSION: Select listbox dispatches a change event on scroll. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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/select/listbox-click-on-scrollbar-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLSelectElement.cpp
diff --git a/Source/core/html/HTMLSelectElement.cpp b/Source/core/html/HTMLSelectElement.cpp
index 77585bfd9bca30d165811d9dd4236d94547a6849..5af0ae9c1949b2a7132321c096a6e4d21499589a 100644
--- a/Source/core/html/HTMLSelectElement.cpp
+++ b/Source/core/html/HTMLSelectElement.cpp
@@ -1338,6 +1338,9 @@ void HTMLSelectElement::listBoxDefaultEventHandler(Event* event)
event->setDefaultHandled();
}
} else if (event->type() == eventNames().mouseupEvent && event->isMouseEvent() && static_cast<MouseEvent*>(event)->button() == LeftButton && document()->frame()->eventHandler()->autoscrollRenderer() != renderer()) {
+ // We didn't start this click/drag on any options.
+ if (m_lastOnChangeSelection.isEmpty())
+ return;
// This makes sure we fire dispatchFormControlChangeEvent for a single
// click. For drag selection, onChange will fire when the autoscroll
// timer stops.
« no previous file with comments | « LayoutTests/fast/forms/select/listbox-click-on-scrollbar-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698