diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp index 6f9cf59da243..9f84dbf15037 100644 --- a/layout/forms/nsListControlFrame.cpp +++ b/layout/forms/nsListControlFrame.cpp @@ -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; } diff --git a/layout/html/forms/src/nsGfxListControlFrame.cpp b/layout/html/forms/src/nsGfxListControlFrame.cpp index b18ce43d80af..19cd902d0432 100644 --- a/layout/html/forms/src/nsGfxListControlFrame.cpp +++ b/layout/html/forms/src/nsGfxListControlFrame.cpp @@ -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; } diff --git a/layout/html/forms/src/nsListControlFrame.cpp b/layout/html/forms/src/nsListControlFrame.cpp index 6f9cf59da243..9f84dbf15037 100644 --- a/layout/html/forms/src/nsListControlFrame.cpp +++ b/layout/html/forms/src/nsListControlFrame.cpp @@ -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; }