From 6333de29c57af04365165666982b659f5a78cbab Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Wed, 13 Sep 2000 01:45:23 +0000 Subject: [PATCH] when we see that the mouseDown event was cancelled, stop tracking drags. This allows mousedown/move/up events to be processed by webpages w/out us interfering. r=joki, bug 43258. --- content/events/src/nsEventStateManager.cpp | 5 +++++ layout/events/src/nsEventStateManager.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/content/events/src/nsEventStateManager.cpp b/content/events/src/nsEventStateManager.cpp index dcdbe9e2649..41104ee23dd 100644 --- a/content/events/src/nsEventStateManager.cpp +++ b/content/events/src/nsEventStateManager.cpp @@ -887,6 +887,11 @@ nsEventStateManager::PostHandleEvent(nsIPresContext* aPresContext, SetContentState(newFocus, NS_EVENT_STATE_ACTIVE); } + else { + // if we're here, the event handler returned false, so stop + // any of our own processing of a drag. Workaround for bug 43258. + StopTrackingDragGesture(); + } } break; case NS_MOUSE_LEFT_BUTTON_UP: diff --git a/layout/events/src/nsEventStateManager.cpp b/layout/events/src/nsEventStateManager.cpp index dcdbe9e2649..41104ee23dd 100644 --- a/layout/events/src/nsEventStateManager.cpp +++ b/layout/events/src/nsEventStateManager.cpp @@ -887,6 +887,11 @@ nsEventStateManager::PostHandleEvent(nsIPresContext* aPresContext, SetContentState(newFocus, NS_EVENT_STATE_ACTIVE); } + else { + // if we're here, the event handler returned false, so stop + // any of our own processing of a drag. Workaround for bug 43258. + StopTrackingDragGesture(); + } } break; case NS_MOUSE_LEFT_BUTTON_UP: