Stop image control frame stomping on the event status. This stops context menu events being propogated to their parents and sent twice for input elements with images. bugscape=14131 r=saari@netscape.com sr=jst@netscape.com

This commit is contained in:
locka%iol.ie 2002-05-01 20:15:44 +00:00
parent 2df3d126d7
commit 08b77d441d
2 changed files with 10 additions and 0 deletions

View File

@ -329,6 +329,11 @@ nsImageControlFrame::HandleEvent(nsIPresContext* aPresContext,
{
NS_ENSURE_ARG_POINTER(aEventStatus);
// Don't do anything if the event has already been handled by someone
if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
return NS_OK;
}
// do we have user-input style?
const nsStyleUserInterface* uiStyle;
GetStyleData(eStyleStruct_UserInterface, (const nsStyleStruct *&)uiStyle);

View File

@ -329,6 +329,11 @@ nsImageControlFrame::HandleEvent(nsIPresContext* aPresContext,
{
NS_ENSURE_ARG_POINTER(aEventStatus);
// Don't do anything if the event has already been handled by someone
if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
return NS_OK;
}
// do we have user-input style?
const nsStyleUserInterface* uiStyle;
GetStyleData(eStyleStruct_UserInterface, (const nsStyleStruct *&)uiStyle);