зеркало из https://github.com/mozilla/gecko-dev.git
Bug 420502 - "Using enter/return in dialogs runs the underlying command twice" [p=dev@schonfeld.org (Michael Schonfeld) r=josh r=masayuki sr=roc a1.9b4=beltzner a=blocking1.9+]
This commit is contained in:
Родитель
de2ac86895
Коммит
8ac38c7dae
|
@ -3953,6 +3953,11 @@ static PRBool IsSpecialGeckoKey(UInt32 macKeyCode)
|
|||
bufPtr[len] = PRUnichar('\0');
|
||||
|
||||
if (len == 1 && !nsTSMManager::IsComposing()) {
|
||||
// don't let the same event be fired twice when hitting
|
||||
// enter/return! (Bug 420502)
|
||||
if (mKeyPressSent)
|
||||
return;
|
||||
|
||||
// dispatch keypress event with char instead of textEvent
|
||||
nsKeyEvent geckoEvent(PR_TRUE, NS_KEY_PRESS, mGeckoChild);
|
||||
geckoEvent.time = PR_IntervalNow();
|
||||
|
|
Загрузка…
Ссылка в новой задаче