Bug 623624 - Content elements don't get focus when the focus method is set on them [r=mfinkle]

This commit is contained in:
Vivien Nicolas 2011-03-25 18:39:22 +01:00
parent 0c0f768648
commit 62c3b41c0e

View File

@ -2746,8 +2746,13 @@ Tab.prototype = {
Elements.browsers.selectedPanel = notification;
browser.active = true;
document.getElementById("tabs").selectedTab = this._chromeTab;
}
else {
// Ensure that the content process has gets an activate event
try {
let fl = browser.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader;
fl.activateRemoteFrame();
} catch (e) {}
} else {
browser.messageManager.sendAsyncMessage("Browser:Blur", { });
browser.setAttribute("type", "content");
browser.active = false;