Bug 1367765 - Do not scroll-to-click on touchstart if touch point is over thumb. r=rhunt

This matches the behaviour of mouse events over a scroll thumb.

MozReview-Commit-ID: ArLzC6JXfos

--HG--
extra : rebase_source : 96f83e6b312dabd3c5573d73c1ce3f01e53055e5
This commit is contained in:
Botond Ballo 2017-09-06 19:14:39 -04:00
parent 6855c57a08
commit c8286ea7d2

View File

@ -1343,11 +1343,7 @@ nsSliderFrame::ShouldScrollToClickForEvent(WidgetGUIEvent* aEvent)
return false;
}
if (aEvent->mMessage == eTouchStart) {
return GetScrollToClick();
}
if (aEvent->mMessage != eMouseDown) {
if (aEvent->mMessage != eMouseDown && aEvent->mMessage != eTouchStart) {
return false;
}
@ -1358,6 +1354,10 @@ nsSliderFrame::ShouldScrollToClickForEvent(WidgetGUIEvent* aEvent)
}
#endif
if (aEvent->mMessage == eTouchStart) {
return GetScrollToClick();
}
WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
if (mouseEvent->button == WidgetMouseEvent::eLeftButton) {
#ifdef XP_MACOSX