Bug 831421 - Arrow keys are broken in test-ipc.xul, r=neil

This commit is contained in:
Olli Pettay 2013-01-24 18:38:59 +02:00
parent 497f06f2c6
commit a2de630b4d

View File

@ -31,6 +31,7 @@
#include "nsGUIEvent.h"
#include "mozilla/Preferences.h"
#include "mozilla/dom/Element.h"
#include "nsEventStateManager.h"
using namespace mozilla;
@ -378,6 +379,14 @@ nsXBLWindowKeyHandler::HandleEvent(nsIDOMEvent* aEvent)
nsCOMPtr<nsIAtom> eventTypeAtom = do_GetAtom(eventType);
NS_ENSURE_TRUE(eventTypeAtom, NS_ERROR_OUT_OF_MEMORY);
if (!mWeakPtrForElement) {
nsCOMPtr<mozilla::dom::Element> originalTarget =
do_QueryInterface(aEvent->GetInternalNSEvent()->originalTarget);
if (nsEventStateManager::IsRemoteTarget(originalTarget)) {
return NS_OK;
}
}
return WalkHandlers(keyEvent, eventTypeAtom);
}