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

Unified Diff: third_party/WebKit/Source/core/input/MouseEventManager.cpp

Issue 2900123002: Account for mouse leave events in dragging flow (Closed)
Patch Set: Add the test Created 3 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
Index: third_party/WebKit/Source/core/input/MouseEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/MouseEventManager.cpp b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
index 2a94832d32f2622b16ed9661b5cec4462221a4dd..6f9bd387663739cba798f67fedf1514bc60ec86e 100644
--- a/third_party/WebKit/Source/core/input/MouseEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
@@ -718,7 +718,10 @@ WebInputEventResult MouseEventManager::HandleMouseDraggedEvent(
// that ends as a result of a mouse release does not send a mouse release
// event. As a result, m_mousePressed also ends up remaining true until
// the next mouse release event seen by the EventHandler.
- if (event.Event().button != WebPointerProperties::Button::kLeft)
+ // 3. When pressing Esc key while dragging and the object is outside of the
+ // we get a mouse leave event here
+ if (event.Event().button != WebPointerProperties::Button::kLeft ||
+ event.Event().GetType() == WebInputEvent::kMouseLeave)
mouse_pressed_ = false;
if (!mouse_pressed_)

Powered by Google App Engine
This is Rietveld 408576698