зеркало из https://github.com/mozilla/pjs.git
use native event routing for synthesized key events. b=432405 r/sr=roc a=dsicore
This commit is contained in:
Родитель
a91fad2dbb
Коммит
6ab5787b83
|
@ -1305,8 +1305,8 @@ void nsChildView::SynthesizeNativeKeyEvent(PRInt32 aNativeKeyboardLayout,
|
|||
PRInt32 currentLayout = gOverrideKeyboardLayout;
|
||||
gOverrideKeyboardLayout = aNativeKeyboardLayout;
|
||||
ChildView* view = static_cast<ChildView*>(mView);
|
||||
[view keyDown:downEvent];
|
||||
[view keyUp:upEvent];
|
||||
[NSApp sendEvent:downEvent];
|
||||
[NSApp sendEvent:upEvent];
|
||||
// processKeyDownEvent and keyUp block exceptions so we're sure to
|
||||
// reach here to restore gOverrideKeyboardLayout
|
||||
gOverrideKeyboardLayout = currentLayout;
|
||||
|
|
|
@ -39,6 +39,8 @@ function synthesizeNativeKey(aLayout, aKeyCode, aModifiers, aSystemChars,
|
|||
if (!aWindow)
|
||||
aWindow = window;
|
||||
|
||||
document.getElementById("button").focus();
|
||||
|
||||
var utils = aWindow.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
|
||||
getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче