Fix shortcut key regression by allowing command= event retargeting to elements other than <command> (bug 336740). r=neil sr=bzbarsky
This commit is contained in:
Родитель
edb8aed0a5
Коммит
25ca42d743
|
@ -1692,9 +1692,7 @@ nsXULElement::PreHandleEvent(nsEventChainPreVisitor& aVisitor)
|
||||||
nsCOMPtr<nsIDOMElement> commandElt;
|
nsCOMPtr<nsIDOMElement> commandElt;
|
||||||
domDoc->GetElementById(command, getter_AddRefs(commandElt));
|
domDoc->GetElementById(command, getter_AddRefs(commandElt));
|
||||||
nsCOMPtr<nsIContent> commandContent(do_QueryInterface(commandElt));
|
nsCOMPtr<nsIContent> commandContent(do_QueryInterface(commandElt));
|
||||||
if (commandContent &&
|
if (commandContent) {
|
||||||
commandContent->IsNodeOfType(nsINode::eXUL) &&
|
|
||||||
commandContent->Tag() == nsXULAtoms::command) {
|
|
||||||
// Reusing the event here, but DISPATCH_DONE/STARTED hack
|
// Reusing the event here, but DISPATCH_DONE/STARTED hack
|
||||||
// is needed.
|
// is needed.
|
||||||
NS_MARK_EVENT_DISPATCH_DONE(aVisitor.mEvent);
|
NS_MARK_EVENT_DISPATCH_DONE(aVisitor.mEvent);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче