Bug 1457338 - Stop touch drag on mouseUp. r=kats, a=jcristau
authorJohann Hofmann <jhofmann@mozilla.com>
Fri, 04 May 2018 15:06:37 +0200
changeset 802250 12bcae3949433c4f56e0a939d511208ec6b17822
parent 802249 977eb5c43f72d56f730880e6b5c21f9ab2a2ffc0
child 802251 0face289ea908187ee19c9400f86f11ee9bf54be
push id111850
push userbmo:tom@mozilla.com
push dateThu, 31 May 2018 16:41:37 +0000
reviewerskats, jcristau
bugs1457338
milestone60.0.2
Bug 1457338 - Stop touch drag on mouseUp. r=kats, a=jcristau MozReview-Commit-ID: 4uPibB3DR1D
dom/events/EventStateManager.cpp
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -643,16 +643,17 @@ EventStateManager::PreHandleEvent(nsPres
     break;
   }
   case eMouseUp: {
     switch (mouseEvent->button) {
       case WidgetMouseEvent::eLeftButton:
         if (Prefs::ClickHoldContextMenu()) {
           KillClickHoldTimer();
         }
+        mInTouchDrag = false;
         StopTrackingDragGesture();
         sNormalLMouseEventInProcess = false;
         // then fall through...
         MOZ_FALLTHROUGH;
       case WidgetMouseEvent::eRightButton:
       case WidgetMouseEvent::eMiddleButton:
         RefPtr<EventStateManager> esm = ESMFromContentOrThis(aOverrideClickTarget);
         esm->SetClickCount(mouseEvent, aStatus, aOverrideClickTarget);