Index: lib/ui.js |
=================================================================== |
--- a/lib/ui.js |
+++ b/lib/ui.js |
@@ -1750,18 +1750,20 @@ let UI = exports.UI = |
let {addBottomBar, removeBottomBar, getBrowser} = require("appSupport"); |
let mustDetach = !addBottomBar || !removeBottomBar || !("abp-bottombar-container" in this.overlay); |
let detach = mustDetach || Prefs.detachsidebar; |
if (!detach && window.document.getElementById("abp-bottombar")) |
{ |
removeBottomBar(window); |
let browser = (getBrowser ? getBrowser(window) : null); |
+ if (browser && "selectedBrowser" in browser) |
+ browser = browser.selectedBrowser; |
if (browser) |
- browser.contentWindow.focus(); |
+ browser.focus(); |
} |
else if (!detach) |
{ |
addBottomBar(window, this.overlay["abp-bottombar-container"]); |
let element = window.document.getElementById("abp-bottombar"); |
if (element) |
{ |
element.setAttribute("width", Prefs.blockableItemsSize.width); |