зеркало из 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;
|
PRInt32 currentLayout = gOverrideKeyboardLayout;
|
||||||
gOverrideKeyboardLayout = aNativeKeyboardLayout;
|
gOverrideKeyboardLayout = aNativeKeyboardLayout;
|
||||||
ChildView* view = static_cast<ChildView*>(mView);
|
ChildView* view = static_cast<ChildView*>(mView);
|
||||||
[view keyDown:downEvent];
|
[NSApp sendEvent:downEvent];
|
||||||
[view keyUp:upEvent];
|
[NSApp sendEvent:upEvent];
|
||||||
// processKeyDownEvent and keyUp block exceptions so we're sure to
|
// processKeyDownEvent and keyUp block exceptions so we're sure to
|
||||||
// reach here to restore gOverrideKeyboardLayout
|
// reach here to restore gOverrideKeyboardLayout
|
||||||
gOverrideKeyboardLayout = currentLayout;
|
gOverrideKeyboardLayout = currentLayout;
|
||||||
|
|
|
@ -39,6 +39,8 @@ function synthesizeNativeKey(aLayout, aKeyCode, aModifiers, aSystemChars,
|
||||||
if (!aWindow)
|
if (!aWindow)
|
||||||
aWindow = window;
|
aWindow = window;
|
||||||
|
|
||||||
|
document.getElementById("button").focus();
|
||||||
|
|
||||||
var utils = aWindow.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
|
var utils = aWindow.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
|
||||||
getInterface(Components.interfaces.nsIDOMWindowUtils);
|
getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче