Bug 39723: Send only one request to the server when clicking on an image map. r=joki
git-svn-id: svn://10.0.0.236/trunk@72225 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
8f2c21ff8e
commit
1826a073a2
@ -582,6 +582,16 @@ nsHTMLImageElement::HandleDOMEvent(nsIPresContext* aPresContext,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus* aEventStatus)
|
||||
{
|
||||
// If we are a map and get a mouse click, don't let it be handled by the
|
||||
// Generic Element as this could cause a click event to fire twice, once by
|
||||
// the image frame for the map and once by the Anchor element. (bug 39723)
|
||||
if (NS_MOUSE_LEFT_CLICK == aEvent->message) {
|
||||
PRBool isMap = PR_FALSE;
|
||||
GetIsMap(&isMap);
|
||||
if (isMap) {
|
||||
*aEventStatus = nsEventStatus_eConsumeNoDefault;
|
||||
}
|
||||
}
|
||||
return mInner.HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
|
||||
aFlags, aEventStatus);
|
||||
}
|
||||
|
||||
@ -582,6 +582,16 @@ nsHTMLImageElement::HandleDOMEvent(nsIPresContext* aPresContext,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus* aEventStatus)
|
||||
{
|
||||
// If we are a map and get a mouse click, don't let it be handled by the
|
||||
// Generic Element as this could cause a click event to fire twice, once by
|
||||
// the image frame for the map and once by the Anchor element. (bug 39723)
|
||||
if (NS_MOUSE_LEFT_CLICK == aEvent->message) {
|
||||
PRBool isMap = PR_FALSE;
|
||||
GetIsMap(&isMap);
|
||||
if (isMap) {
|
||||
*aEventStatus = nsEventStatus_eConsumeNoDefault;
|
||||
}
|
||||
}
|
||||
return mInner.HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
|
||||
aFlags, aEventStatus);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user