Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/ui.js

Issue 29333169: Issue 3407 - Don`t access content window when closing blockable items (Closed)
Patch Set: Created Jan. 4, 2016, 7:36 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld