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

Unified Diff: lib/filterComposer.js

Issue 29632566: Issue 6113 - Workaround buggy windows.create in Firefox 51 (Closed)
Patch Set: Created Dec. 7, 2017, 1:16 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/filterComposer.js
diff --git a/lib/filterComposer.js b/lib/filterComposer.js
index 304aac40647e3144042119453262a2d5ed807d0e..fe6d51eb9b0bb32f0fc574dced0c2b81a39a3352 100644
--- a/lib/filterComposer.js
+++ b/lib/filterComposer.js
@@ -223,6 +223,14 @@ port.on("composer.openDialog", (message, sender) =>
height: 200,
type: "popup"
}).then(window =>
+ {
+ // The windows.create API with versions of Firefox < 52 doesn't seem to
+ // populate the tabs property reliably.
+ if ("tabs" in window)
+ return window;
+ else
+ return browser.windows.get(window.id, {populate: true});
+ }).then(window =>
{
let popupPageId = window.tabs[0].id;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld