Bug 39723: Send only one request to the server when clicking on an image map. r=joki

This commit is contained in:
pollmann%netscape.com 2000-06-14 15:02:18 +00:00
Родитель d974f01a10
Коммит a40225584e
2 изменённых файлов: 20 добавлений и 0 удалений

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

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