зеркало из https://github.com/mozilla/gecko-dev.git
Bug 923971 - Prevent global F10 shortcut from overriding devtools one. r=enndeakin
This commit is contained in:
Родитель
4bde0c6b44
Коммит
b80c159312
|
@ -77,14 +77,14 @@ nsMenuBarFrame::Init(nsIContent* aContent,
|
|||
// Also hook up the listener to the window listening for focus events. This is so we can keep proper
|
||||
// state as the user alt-tabs through processes.
|
||||
|
||||
mTarget->AddEventListener(NS_LITERAL_STRING("keypress"), mMenuBarListener, false);
|
||||
mTarget->AddEventListener(NS_LITERAL_STRING("keydown"), mMenuBarListener, false);
|
||||
mTarget->AddEventListener(NS_LITERAL_STRING("keyup"), mMenuBarListener, false);
|
||||
mTarget->AddSystemEventListener(NS_LITERAL_STRING("keypress"), mMenuBarListener, false);
|
||||
mTarget->AddSystemEventListener(NS_LITERAL_STRING("keydown"), mMenuBarListener, false);
|
||||
mTarget->AddSystemEventListener(NS_LITERAL_STRING("keyup"), mMenuBarListener, false);
|
||||
|
||||
// mousedown event should be handled in all phase
|
||||
mTarget->AddEventListener(NS_LITERAL_STRING("mousedown"), mMenuBarListener, true);
|
||||
mTarget->AddEventListener(NS_LITERAL_STRING("mousedown"), mMenuBarListener, false);
|
||||
mTarget->AddEventListener(NS_LITERAL_STRING("blur"), mMenuBarListener, true);
|
||||
mTarget->AddSystemEventListener(NS_LITERAL_STRING("mousedown"), mMenuBarListener, true);
|
||||
mTarget->AddSystemEventListener(NS_LITERAL_STRING("mousedown"), mMenuBarListener, false);
|
||||
mTarget->AddSystemEventListener(NS_LITERAL_STRING("blur"), mMenuBarListener, true);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -411,13 +411,13 @@ nsMenuBarFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
|||
if (pm)
|
||||
pm->SetActiveMenuBar(this, false);
|
||||
|
||||
mTarget->RemoveEventListener(NS_LITERAL_STRING("keypress"), mMenuBarListener, false);
|
||||
mTarget->RemoveEventListener(NS_LITERAL_STRING("keydown"), mMenuBarListener, false);
|
||||
mTarget->RemoveEventListener(NS_LITERAL_STRING("keyup"), mMenuBarListener, false);
|
||||
mTarget->RemoveSystemEventListener(NS_LITERAL_STRING("keypress"), mMenuBarListener, false);
|
||||
mTarget->RemoveSystemEventListener(NS_LITERAL_STRING("keydown"), mMenuBarListener, false);
|
||||
mTarget->RemoveSystemEventListener(NS_LITERAL_STRING("keyup"), mMenuBarListener, false);
|
||||
|
||||
mTarget->RemoveEventListener(NS_LITERAL_STRING("mousedown"), mMenuBarListener, true);
|
||||
mTarget->RemoveEventListener(NS_LITERAL_STRING("mousedown"), mMenuBarListener, false);
|
||||
mTarget->RemoveEventListener(NS_LITERAL_STRING("blur"), mMenuBarListener, true);
|
||||
mTarget->RemoveSystemEventListener(NS_LITERAL_STRING("mousedown"), mMenuBarListener, true);
|
||||
mTarget->RemoveSystemEventListener(NS_LITERAL_STRING("mousedown"), mMenuBarListener, false);
|
||||
mTarget->RemoveSystemEventListener(NS_LITERAL_STRING("blur"), mMenuBarListener, true);
|
||||
|
||||
NS_IF_RELEASE(mMenuBarListener);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче