diff --git a/modules/utils.js b/modules/utils.js index 13785723..c5bca8a3 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -851,7 +851,7 @@ var TreeStyleTabUtils = { aTabBrowserChild, Ci.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE ).singleNodeValue; - if (popup && 'TabContextMenu' in window) + if (popup && 'TabContextMenu' in aTabBrowserChild.ownerDocument.defaultView) return this.getTabBrowserFromChild(TabContextMenu.contextTab); var b = this.evaluateXPath(