mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 902830 - Emit mozChromeEvent if input focus changes. r=yxl
This commit is contained in:
parent
c79c4d63d6
commit
abd5d0434d
@ -106,7 +106,7 @@ let Keyboard = {
|
||||
|
||||
switch (msg.name) {
|
||||
case 'Forms:Input':
|
||||
this.forwardEvent('Keyboard:FocusChange', msg);
|
||||
this.handleFocusChange(msg);
|
||||
break;
|
||||
case 'Forms:SelectionChange':
|
||||
case 'Forms:GetText:Result:OK':
|
||||
@ -163,6 +163,17 @@ let Keyboard = {
|
||||
ppmm.broadcastAsyncMessage(newEventName, msg.data);
|
||||
},
|
||||
|
||||
handleFocusChange: function keyboardHandleFocusChange(msg) {
|
||||
this.forwardEvent('Keyboard:FocusChange', msg);
|
||||
|
||||
let browser = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
|
||||
browser.shell.sendChromeEvent({
|
||||
type: 'inputmethod-contextchange',
|
||||
inputType: msg.data.type
|
||||
});
|
||||
},
|
||||
|
||||
setSelectedOption: function keyboardSetSelectedOption(msg) {
|
||||
this.messageManager.sendAsyncMessage('Forms:Select:Choice', msg.data);
|
||||
},
|
||||
@ -191,14 +202,14 @@ let Keyboard = {
|
||||
showInputMethodPicker: function keyboardShowInputMethodPicker() {
|
||||
let browser = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
browser.shell.sendChromeEvent({
|
||||
type: "input-method-show-picker"
|
||||
type: "inputmethod-showall"
|
||||
});
|
||||
},
|
||||
|
||||
switchToNextInputMethod: function keyboardSwitchToNextInputMethod() {
|
||||
let browser = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
browser.shell.sendChromeEvent({
|
||||
type: "input-method-switch-to-next"
|
||||
type: "inputmethod-next"
|
||||
});
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user