Preventing event from bubbling, capture and default causes a mismatch in mousecapture

and this causes the lock. After a lot of testing it appears that the original reason
this was needed is no longer there.
Bug 38422 r=kmcclusk
This commit is contained in:
rods%netscape.com 2000-05-22 21:35:00 +00:00
Родитель 9366dbc29d
Коммит ed680830a6
3 изменённых файлов: 6 добавлений и 44 удалений

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

@ -2778,6 +2778,7 @@ nsListControlFrame::MouseUp(nsIDOMEvent* aMouseEvent)
// only allow selection with the left button
if (!IsLeftButton(aMouseEvent)) {
// IsLeftButton Prevents all propragation of the event
return NS_ERROR_FAILURE; // means consume event
}
@ -2823,13 +2824,6 @@ nsListControlFrame::MouseUp(nsIDOMEvent* aMouseEvent)
#endif
}
if (IsInDropDownMode() == PR_TRUE) {
aMouseEvent->PreventDefault();
aMouseEvent->PreventCapture();
aMouseEvent->PreventBubble();
REFLOW_DEBUG_MSG(">>>>>> Returning and preventing bubbling");
return NS_ERROR_FAILURE; //consumes event
}
return NS_OK;
}
@ -2924,9 +2918,7 @@ nsListControlFrame::MouseDown(nsIDOMEvent* aMouseEvent)
// only allow selection with the left button
if (!IsLeftButton(aMouseEvent)) {
aMouseEvent->PreventDefault();
aMouseEvent->PreventCapture();
aMouseEvent->PreventBubble();
// IsLeftButton Prevents all propragation of the event
return NS_ERROR_FAILURE; // means consume event
}
@ -3022,12 +3014,6 @@ nsListControlFrame::MouseDown(nsIDOMEvent* aMouseEvent)
}
}
if (IsInDropDownMode() == PR_TRUE) {
aMouseEvent->PreventDefault();
aMouseEvent->PreventCapture();
aMouseEvent->PreventBubble();
return NS_ERROR_FAILURE; //consumes event
}
return NS_OK;
}

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

@ -2939,6 +2939,7 @@ nsGfxListControlFrame::MouseUp(nsIDOMEvent* aMouseEvent)
// only allow selection with the left button
if (!IsLeftButton(aMouseEvent)) {
// IsLeftButton Prevents all propragation of the event
return NS_ERROR_FAILURE; // means consume event
}
@ -2978,12 +2979,6 @@ nsGfxListControlFrame::MouseUp(nsIDOMEvent* aMouseEvent)
}
}
if (IsInDropDownMode() == PR_TRUE) {
aMouseEvent->PreventDefault();
aMouseEvent->PreventCapture();
aMouseEvent->PreventBubble();
return NS_ERROR_FAILURE; //consumes event
}
return NS_OK;
}
@ -3084,6 +3079,7 @@ nsGfxListControlFrame::MouseDown(nsIDOMEvent* aMouseEvent)
// only allow selection with the left button
if (!IsLeftButton(aMouseEvent)) {
// IsLeftButton Prevents all propragation of the event
return NS_ERROR_FAILURE; // means consume event
}
@ -3197,12 +3193,6 @@ nsGfxListControlFrame::MouseDown(nsIDOMEvent* aMouseEvent)
}
}
if (IsInDropDownMode() == PR_TRUE) {
aMouseEvent->PreventDefault();
aMouseEvent->PreventCapture();
aMouseEvent->PreventBubble();
return NS_ERROR_FAILURE; //consumes event
}
return NS_OK;
}

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

@ -2778,6 +2778,7 @@ nsListControlFrame::MouseUp(nsIDOMEvent* aMouseEvent)
// only allow selection with the left button
if (!IsLeftButton(aMouseEvent)) {
// IsLeftButton Prevents all propragation of the event
return NS_ERROR_FAILURE; // means consume event
}
@ -2823,13 +2824,6 @@ nsListControlFrame::MouseUp(nsIDOMEvent* aMouseEvent)
#endif
}
if (IsInDropDownMode() == PR_TRUE) {
aMouseEvent->PreventDefault();
aMouseEvent->PreventCapture();
aMouseEvent->PreventBubble();
REFLOW_DEBUG_MSG(">>>>>> Returning and preventing bubbling");
return NS_ERROR_FAILURE; //consumes event
}
return NS_OK;
}
@ -2924,9 +2918,7 @@ nsListControlFrame::MouseDown(nsIDOMEvent* aMouseEvent)
// only allow selection with the left button
if (!IsLeftButton(aMouseEvent)) {
aMouseEvent->PreventDefault();
aMouseEvent->PreventCapture();
aMouseEvent->PreventBubble();
// IsLeftButton Prevents all propragation of the event
return NS_ERROR_FAILURE; // means consume event
}
@ -3022,12 +3014,6 @@ nsListControlFrame::MouseDown(nsIDOMEvent* aMouseEvent)
}
}
if (IsInDropDownMode() == PR_TRUE) {
aMouseEvent->PreventDefault();
aMouseEvent->PreventCapture();
aMouseEvent->PreventBubble();
return NS_ERROR_FAILURE; //consumes event
}
return NS_OK;
}