mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 11:38:16 +00:00
Don't handle a key event as a keypress if the meta key is down.
This commit is contained in:
parent
b5f4a817ba
commit
c9dbb47be6
@ -206,11 +206,13 @@ nsTextEditorKeyListener::KeyPress(nsIDOMEvent* aKeyEvent)
|
||||
// eaiser
|
||||
//
|
||||
|
||||
PRBool ctrlKey;
|
||||
PRBool altKey;
|
||||
PRBool ctrlKey, altKey, metaKey;
|
||||
uiEvent->GetCtrlKey(&ctrlKey);
|
||||
uiEvent->GetAltKey(&altKey);
|
||||
|
||||
uiEvent->GetMetaKey(&metaKey);
|
||||
if (metaKey)
|
||||
return NS_OK; // don't consume
|
||||
|
||||
if (NS_SUCCEEDED(uiEvent->GetKeyCode(&keyCode)))
|
||||
{
|
||||
if (nsIDOMUIEvent::VK_BACK==keyCode) {
|
||||
|
@ -206,11 +206,13 @@ nsTextEditorKeyListener::KeyPress(nsIDOMEvent* aKeyEvent)
|
||||
// eaiser
|
||||
//
|
||||
|
||||
PRBool ctrlKey;
|
||||
PRBool altKey;
|
||||
PRBool ctrlKey, altKey, metaKey;
|
||||
uiEvent->GetCtrlKey(&ctrlKey);
|
||||
uiEvent->GetAltKey(&altKey);
|
||||
|
||||
uiEvent->GetMetaKey(&metaKey);
|
||||
if (metaKey)
|
||||
return NS_OK; // don't consume
|
||||
|
||||
if (NS_SUCCEEDED(uiEvent->GetKeyCode(&keyCode)))
|
||||
{
|
||||
if (nsIDOMUIEvent::VK_BACK==keyCode) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user