зеркало из https://github.com/mozilla/gecko-dev.git
Bug 258193 nsIDOMMouseEvent::GetButton() broken with contextmenu event
p=trev@gtchat.de r=jst sr=bzbarsky
This commit is contained in:
Родитель
ddee974556
Коммит
f728846b40
|
@ -152,7 +152,7 @@ nsDOMMouseEvent::GetButton(PRUint16* aButton)
|
|||
}
|
||||
|
||||
// If button has been set then use that instead.
|
||||
if (mButton > 0) {
|
||||
if (mButton >= 0) {
|
||||
*aButton = (PRUint16)mButton;
|
||||
}
|
||||
else {
|
||||
|
@ -173,9 +173,12 @@ nsDOMMouseEvent::GetButton(PRUint16* aButton)
|
|||
case NS_MOUSE_RIGHT_BUTTON_DOWN:
|
||||
case NS_MOUSE_RIGHT_CLICK:
|
||||
case NS_MOUSE_RIGHT_DOUBLECLICK:
|
||||
case NS_CONTEXTMENU:
|
||||
*aButton = 2;
|
||||
break;
|
||||
default:
|
||||
// This event doesn't have a mouse button associated with it
|
||||
*aButton = (PRUint16)-1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче