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

Unified Diff: Source/core/html/shadow/SliderThumbElement.cpp

Issue 125973004: Update of change event for range input type (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: OnChange to also trigger OnInput event Created 6 years, 11 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/range/slider-onchange-event-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/shadow/SliderThumbElement.cpp
diff --git a/Source/core/html/shadow/SliderThumbElement.cpp b/Source/core/html/shadow/SliderThumbElement.cpp
index 2ce78fec2a67a8f9482454c88aac3e4dbcba1a40..793a459031ae94b23c28a0857916ed490b90de3e 100644
--- a/Source/core/html/shadow/SliderThumbElement.cpp
+++ b/Source/core/html/shadow/SliderThumbElement.cpp
@@ -323,9 +323,13 @@ void SliderThumbElement::stopDragging()
if (Frame* frame = document().frame())
frame->eventHandler().setCapturingMouseEventsNode(0);
m_inDragMode = false;
+
+ // Dispatch both change and input event when drag is stopped
+ hostInput()->dispatchFormControlInputEvent();
+ hostInput()->dispatchFormControlChangeEvent();
+
if (renderer())
renderer()->setNeedsLayout();
- hostInput()->dispatchFormControlChangeEvent();
}
void SliderThumbElement::defaultEventHandler(Event* event)
« no previous file with comments | « LayoutTests/fast/forms/range/slider-onchange-event-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698