Bug 1135293 - Send inputmethod-contextchange to systemapp to hide keyboard when frame crash. r=yxl
authorGeorge Duan <gduan@mozilla.com>
Tue, 17 Mar 2015 20:24:00 -0400
changeset 264173 60a191c34578fd24c4444f931a040b3d111a5132
parent 264172 1e86367b00238af5e0c4dfff2e9a893671d3f7fc
child 264174 17c7071d6d1432ad5ce06601cff532e26b2d725e
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyxl
bugs1135293
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1135293 - Send inputmethod-contextchange to systemapp to hide keyboard when frame crash. r=yxl DONTBUILD
dom/inputmethod/Keyboard.jsm
--- a/dom/inputmethod/Keyboard.jsm
+++ b/dom/inputmethod/Keyboard.jsm
@@ -110,16 +110,21 @@ this.Keyboard = {
     let frameLoader = subject.QueryInterface(Ci.nsIFrameLoader);
     let mm = frameLoader.messageManager;
 
     if (topic == 'oop-frameloader-crashed') {
       if (this.formMM == mm) {
         // The application has been closed unexpectingly. Let's tell the
         // keyboard app that the focus has been lost.
         this.sendToKeyboard('Keyboard:FocusChange', { 'type': 'blur' });
+        // Notify system app to hide keyboard.
+        SystemAppProxy.dispatchEvent({
+          type: 'inputmethod-contextchange',
+          inputType: 'blur'
+        });
       }
     } else {
       // Ignore notifications that aren't from a BrowserOrApp
       if (!frameLoader.ownerIsBrowserOrAppFrame) {
         return;
       }
       this.initFormsFrameScript(mm);
     }