mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Call PerformAccesskey() on the controlled element in case it's not a nsIDOMXULElement. b=400774 r=surkov.alexander sr=jst a=dsicore
This commit is contained in:
parent
6ff9f4a686
commit
717a2ab67d
@ -631,19 +631,23 @@ nsXULElement::PerformAccesskey(PRBool aKeyCausesActivation,
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIDOMXULElement> elm(do_QueryInterface(content));
|
||||
|
||||
// Define behavior for each type of XUL element.
|
||||
nsIAtom *tag = content->Tag();
|
||||
if (tag == nsGkAtoms::textbox || tag == nsGkAtoms::menulist) {
|
||||
// if it's a text box or menulist, give it focus
|
||||
elm->Focus();
|
||||
} else if (tag == nsGkAtoms::toolbarbutton) {
|
||||
// if it's a toolbar button, just click
|
||||
elm->Click();
|
||||
} else {
|
||||
// otherwise, focus and click in it
|
||||
elm->Focus();
|
||||
elm->Click();
|
||||
if (elm) {
|
||||
// Define behavior for each type of XUL element.
|
||||
nsIAtom *tag = content->Tag();
|
||||
if (tag == nsGkAtoms::textbox || tag == nsGkAtoms::menulist) {
|
||||
// if it's a text box or menulist, give it focus
|
||||
elm->Focus();
|
||||
} else if (tag == nsGkAtoms::toolbarbutton) {
|
||||
// if it's a toolbar button, just click
|
||||
elm->Click();
|
||||
} else {
|
||||
// otherwise, focus and click in it
|
||||
elm->Focus();
|
||||
elm->Click();
|
||||
}
|
||||
}
|
||||
else {
|
||||
content->PerformAccesskey(aKeyCausesActivation, aIsTrustedEvent);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user