Bug 378752 Mnemonic of Menu doesn't work if an editor has focus and IME is on r+sr=roc
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
#include "nsMenuPopupFrame.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "prtypes.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsPresContext.h"
|
||||
@@ -1800,7 +1801,9 @@ nsMenuPopupFrame::InstallKeyboardNavigator()
|
||||
target->AddEventListener(NS_LITERAL_STRING("keypress"), (nsIDOMKeyListener*)mKeyboardNavigator, PR_TRUE);
|
||||
target->AddEventListener(NS_LITERAL_STRING("keydown"), (nsIDOMKeyListener*)mKeyboardNavigator, PR_TRUE);
|
||||
target->AddEventListener(NS_LITERAL_STRING("keyup"), (nsIDOMKeyListener*)mKeyboardNavigator, PR_TRUE);
|
||||
|
||||
|
||||
nsContentUtils::NotifyInstalledMenuKeyboardListener(PR_TRUE);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -1813,9 +1816,11 @@ nsMenuPopupFrame::RemoveKeyboardNavigator()
|
||||
mTarget->RemoveEventListener(NS_LITERAL_STRING("keypress"), (nsIDOMKeyListener*)mKeyboardNavigator, PR_TRUE);
|
||||
mTarget->RemoveEventListener(NS_LITERAL_STRING("keydown"), (nsIDOMKeyListener*)mKeyboardNavigator, PR_TRUE);
|
||||
mTarget->RemoveEventListener(NS_LITERAL_STRING("keyup"), (nsIDOMKeyListener*)mKeyboardNavigator, PR_TRUE);
|
||||
|
||||
|
||||
NS_IF_RELEASE(mKeyboardNavigator);
|
||||
|
||||
nsContentUtils::NotifyInstalledMenuKeyboardListener(PR_FALSE);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user