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


git-svn-id: svn://10.0.0.236/trunk@70611 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rods%netscape.com
2000-05-22 21:35:00 +00:00
parent 216976b400
commit f9ea52ae06
3 changed files with 6 additions and 44 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}