summaryrefslogtreecommitdiffstats
path: root/application/palemoon/components/places/content/browserPlacesViews.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-08-18 16:25:15 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-08-18 16:26:16 +0200
commit202296d02aa99afa90581333ab059c050b9c3ade (patch)
tree6ed8a1289bed1bb06d2703ea77cba5fccd3bdffa /application/palemoon/components/places/content/browserPlacesViews.js
parent1530f48c27fb13d7cbd2708c9f0fcf2dabc6ed6a (diff)
parentab6242a93b849b0a3c7525b16bc01dd3172fc167 (diff)
downloadUXP-202296d02aa99afa90581333ab059c050b9c3ade.tar
UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar.gz
UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar.lz
UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar.xz
UXP-202296d02aa99afa90581333ab059c050b9c3ade.zip
Pull Basilisk-release forward.
Diffstat (limited to 'application/palemoon/components/places/content/browserPlacesViews.js')
-rw-r--r--application/palemoon/components/places/content/browserPlacesViews.js15
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) {