Bug 585771 - Fennec needs to call SetIsActive() on its nsIWebBrowser [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Wed, 11 Aug 2010 07:27:09 -0700
changeset 1786 2c8340d06d8d8f6ae6faa25bd23c750254116e32
parent 1785 92c6f2e0b5d4db30e7297d61ea9b8cb730868ced
child 1787 823bb6e959909e014ece047480219aa28b92bd2c
push id1595
push usermbrubeck@mozilla.com
push dateWed, 11 Aug 2010 14:27:23 +0000
reviewersmfinkle
bugs585771
Bug 585771 - Fennec needs to call SetIsActive() on its nsIWebBrowser [r=mfinkle]
chrome/content/content.js
--- a/chrome/content/content.js
+++ b/chrome/content/content.js
@@ -447,21 +447,23 @@ Content.prototype = {
     let json = aMessage.json;
     let x = json.x;
     let y = json.y;
     let modifiers = json.modifiers;
 
     switch (aMessage.name) {
       case "Browser:Blur":
         docShell.isOffScreenBrowser = false;
+        docShell.isActive = true;
         this._selected = false;
         break;
 
       case "Browser:Focus":
         docShell.isOffScreenBrowser = true;
+        docShell.isActive = false;
         this._selected = true;
         break;
 
       case "Browser:KeyEvent":
         let utils = Util.getWindowUtils(content);
         let defaultAction = utils.sendKeyEvent(json.type, json.keyCode, json.charCode, modifiers);
         if (defaultAction && json.type == "keypress") {
           const masks = Ci.nsIDOMNSEvent;