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:
@@ -41,6 +41,7 @@
|
||||
#include "nsMenuBarFrame.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "prtypes.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsPresContext.h"
|
||||
@@ -759,7 +760,9 @@ nsMenuBarFrame::InstallKeyboardNavigator()
|
||||
mTarget->AddEventListener(NS_LITERAL_STRING("keypress"), (nsIDOMKeyListener*)mKeyboardNavigator, PR_TRUE);
|
||||
mTarget->AddEventListener(NS_LITERAL_STRING("keydown"), (nsIDOMKeyListener*)mKeyboardNavigator, PR_TRUE);
|
||||
mTarget->AddEventListener(NS_LITERAL_STRING("keyup"), (nsIDOMKeyListener*)mKeyboardNavigator, PR_TRUE);
|
||||
|
||||
|
||||
nsContentUtils::NotifyInstalledMenuKeyboardListener(PR_TRUE);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -772,9 +775,11 @@ nsMenuBarFrame::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