diff --git a/layout/xul/nsSliderFrame.cpp b/layout/xul/nsSliderFrame.cpp index d0af09ac7c68..4f7232f3b04a 100644 --- a/layout/xul/nsSliderFrame.cpp +++ b/layout/xul/nsSliderFrame.cpp @@ -1196,7 +1196,7 @@ nsSliderFrame::DragThumb(bool aGrabMouseEvents) } bool -nsSliderFrame::isDraggingThumb() +nsSliderFrame::isDraggingThumb() const { return (nsIPresShell::GetCapturingContent() == GetContent()); } @@ -1567,7 +1567,8 @@ nsSliderFrame::OnlySystemGroupDispatch(EventMessage aMessage) const // If we are in a native anonymous subtree, do not dispatch mouse-move events // targeted at this slider frame to web content. This matches the behaviour // of other browsers. - return aMessage == eMouseMove && GetContent()->IsInNativeAnonymousSubtree(); + return aMessage == eMouseMove && isDraggingThumb() && + GetContent()->IsInNativeAnonymousSubtree(); } NS_IMPL_ISUPPORTS(nsSliderMediator, diff --git a/layout/xul/nsSliderFrame.h b/layout/xul/nsSliderFrame.h index f41a7537949f..d4e6c9f2fcac 100644 --- a/layout/xul/nsSliderFrame.h +++ b/layout/xul/nsSliderFrame.h @@ -162,7 +162,7 @@ private: void DragThumb(bool aGrabMouseEvents); void AddListener(); void RemoveListener(); - bool isDraggingThumb(); + bool isDraggingThumb() const; void SuppressDisplayport(); void UnsuppressDisplayport();