diff options
author | win7-7 <win7-7@users.noreply.github.com> | 2019-08-04 23:13:48 +0300 |
---|---|---|
committer | win7-7 <win7-7@users.noreply.github.com> | 2019-08-04 23:13:48 +0300 |
commit | 1c53b589c4425cf1bbb6b0bbc9df7689f94c86f3 (patch) | |
tree | 005e15e08597fb9c5798bb20db6494b5d96bea28 /application/palemoon/components/places/content/browserPlacesViews.js | |
parent | 248476f94e89772d64f6cbe597ebb193522f2a46 (diff) | |
parent | 5a957202b70a0b11078b0cffa8967b63baff5661 (diff) | |
download | UXP-1c53b589c4425cf1bbb6b0bbc9df7689f94c86f3.tar UXP-1c53b589c4425cf1bbb6b0bbc9df7689f94c86f3.tar.gz UXP-1c53b589c4425cf1bbb6b0bbc9df7689f94c86f3.tar.lz UXP-1c53b589c4425cf1bbb6b0bbc9df7689f94c86f3.tar.xz UXP-1c53b589c4425cf1bbb6b0bbc9df7689f94c86f3.zip |
Merge branch 'master' into FrameProperties-remove-obsolete-comment
Diffstat (limited to 'application/palemoon/components/places/content/browserPlacesViews.js')
-rw-r--r-- | application/palemoon/components/places/content/browserPlacesViews.js | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/application/palemoon/components/places/content/browserPlacesViews.js b/application/palemoon/components/places/content/browserPlacesViews.js index eec7274a4..8b90dd280 100644 --- a/application/palemoon/components/places/content/browserPlacesViews.js +++ b/application/palemoon/components/places/content/browserPlacesViews.js @@ -109,8 +109,15 @@ PlacesViewBase.prototype = { get selectedNode() { if (this._contextMenuShown) { - let popup = document.popupNode; - return popup._placesNode || popup.parentNode._placesNode || null; + let anchor = this._contextMenuShown.triggerNode; + if (!anchor) + return null; + + if (anchor._placesNode) + return this._rootElt == anchor ? null : anchor._placesNode; + + anchor = anchor.parentNode; + return this._rootElt == anchor ? null : (anchor._placesNode || null); } return null; }, @@ -176,13 +183,13 @@ PlacesViewBase.prototype = { }, buildContextMenu: function PVB_buildContextMenu(aPopup) { - this._contextMenuShown = true; + this._contextMenuShown = aPopup; window.updateCommands("places"); return this.controller.buildContextMenu(aPopup); }, destroyContextMenu: function PVB_destroyContextMenu(aPopup) { - this._contextMenuShown = false; + this._contextMenuShown = null; }, _cleanPopup: function PVB_cleanPopup(aPopup, aDelay) { |