Bug 752988 - Focus lost when closing notification bars. r=enn

--HG--
extra : rebase_source : acb2409d7ac7e0a61525b59e4e9958df2c787c57
This commit is contained in:
Dão Gottwald 2012-07-31 16:24:37 +02:00
parent 0940d0902f
commit fe30865782

View File

@ -168,6 +168,12 @@
if (aChild.eventCallback)
aChild.eventCallback("removed");
this.removeChild(aChild);
// make sure focus doesn't get lost (workaround for bug 570835)
let fm = Components.classes["@mozilla.org/focus-manager;1"]
.getService(Components.interfaces.nsIFocusManager);
if (!fm.getFocusedElementForWindow(window, false, {}))
fm.moveFocus(window, this, fm.MOVEFOCUS_FORWARD, 0);
]]>
</body>
</method>