Bug 364125, middle-click on scroll bar keeps scrolling until the left mouse button is pressed, p=badsector@slashstone.com, r=me, sr=roc

This commit is contained in:
Olli.Pettay%helsinki.fi 2006-12-18 22:45:07 +00:00
Родитель f45b3441d3
Коммит c1fb8ab34d
1 изменённых файлов: 3 добавлений и 7 удалений

Просмотреть файл

@ -529,14 +529,10 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext,
break;
case NS_MOUSE_BUTTON_UP:
if (aEvent->eventStructType != NS_MOUSE_EVENT ||
if (NS_STATIC_CAST(nsMouseEvent*, aEvent)->button == nsMouseEvent::eLeftButton ||
(NS_STATIC_CAST(nsMouseEvent*, aEvent)->button == nsMouseEvent::eMiddleButton &&
!gMiddlePref)) {
break;
}
if (NS_STATIC_CAST(nsMouseEvent*, aEvent)->button == nsMouseEvent::eLeftButton) {
// stop capturing
gMiddlePref)) {
// stop capturing
AddListener();
DragThumb(PR_FALSE);
if (mChange) {