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:
bryner%brianryner.com 2006-05-11 17:36:18 +00:00
Родитель edb8aed0a5
Коммит 25ca42d743
1 изменённых файлов: 1 добавлений и 3 удалений

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

@ -1692,9 +1692,7 @@ nsXULElement::PreHandleEvent(nsEventChainPreVisitor& aVisitor)
nsCOMPtr<nsIDOMElement> commandElt;
domDoc->GetElementById(command, getter_AddRefs(commandElt));
nsCOMPtr<nsIContent> commandContent(do_QueryInterface(commandElt));
if (commandContent &&
commandContent->IsNodeOfType(nsINode::eXUL) &&
commandContent->Tag() == nsXULAtoms::command) {
if (commandContent) {
// Reusing the event here, but DISPATCH_DONE/STARTED hack
// is needed.
NS_MARK_EVENT_DISPATCH_DONE(aVisitor.mEvent);