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:
2007-05-02 08:34:35 -07:00
parent 758d904145
commit e3f47ac88a
6 changed files with 42 additions and 4 deletions

View File

@@ -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;
}