fix for 53760, xbl double firing key events. r=hyatt, a=hyatt

This commit is contained in:
saari%netscape.com 2000-09-28 01:05:26 +00:00
Родитель da9956b3a0
Коммит 80300c590e
2 изменённых файлов: 6 добавлений и 2 удалений

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

@ -251,10 +251,12 @@ nsXBLWindowKeyHandler::WalkHandlersInternal(nsIDOMKeyEvent* aKeyEvent, nsIAtom*
if (mElement) if (mElement)
rec = do_QueryInterface(elt); rec = do_QueryInterface(elt);
rv = currHandler->ExecuteHandler(rec, aKeyEvent); rv = currHandler->ExecuteHandler(rec, aKeyEvent);
if (NS_SUCCEEDED(rv)) if (NS_SUCCEEDED(rv)) {
aKeyEvent->PreventDefault();
return NS_OK; return NS_OK;
} }
} }
}
nsCOMPtr<nsIXBLPrototypeHandler> nextHandler; nsCOMPtr<nsIXBLPrototypeHandler> nextHandler;
currHandler->GetNextHandler(getter_AddRefs(nextHandler)); currHandler->GetNextHandler(getter_AddRefs(nextHandler));

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

@ -251,10 +251,12 @@ nsXBLWindowKeyHandler::WalkHandlersInternal(nsIDOMKeyEvent* aKeyEvent, nsIAtom*
if (mElement) if (mElement)
rec = do_QueryInterface(elt); rec = do_QueryInterface(elt);
rv = currHandler->ExecuteHandler(rec, aKeyEvent); rv = currHandler->ExecuteHandler(rec, aKeyEvent);
if (NS_SUCCEEDED(rv)) if (NS_SUCCEEDED(rv)) {
aKeyEvent->PreventDefault();
return NS_OK; return NS_OK;
} }
} }
}
nsCOMPtr<nsIXBLPrototypeHandler> nextHandler; nsCOMPtr<nsIXBLPrototypeHandler> nextHandler;
currHandler->GetNextHandler(getter_AddRefs(nextHandler)); currHandler->GetNextHandler(getter_AddRefs(nextHandler));