Bug 909335 Don't pass key events to nsINativeKeyBindings if key event is already consumed by WalkHandlersInternal() r=smaug

This commit is contained in:
Masayuki Nakano 2013-08-28 13:04:00 +09:00
parent d2b6b5c7c2
commit 135b566f7a

View File

@ -344,6 +344,14 @@ nsXBLWindowKeyHandler::WalkHandlers(nsIDOMKeyEvent* aKeyEvent, nsIAtom* aEventTy
WalkHandlersInternal(aKeyEvent, aEventType, mHandler);
aKeyEvent->GetDefaultPrevented(&prevent);
if (prevent) {
return NS_OK;
}
// XXX Shouldn't we prefer the native key binding rather than our key
// bindings? I.e., should we call WalkHandlersInternal() after this
// block?
if (isEditor && GetEditorKeyBindings()) {
// get the DOM window we're attached to
nsCOMPtr<nsIControllers> controllers;