summaryrefslogtreecommitdiffstats
path: root/application/palemoon/base
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-04-18 20:24:38 +0200
committerGitHub <noreply@github.com>2018-04-18 20:24:38 +0200
commitab174e65d9223673b14aa6d908e51e71f451b835 (patch)
tree45a73f9cee83852e5df650faf44a46900356ad02 /application/palemoon/base
parentd1b17ef97efd0e4f869c98dfada8d09f1cb1ad5a (diff)
parent37bd28f3efb0a3faf2b771f00626dabc7c29901d (diff)
downloadUXP-ab174e65d9223673b14aa6d908e51e71f451b835.tar
UXP-ab174e65d9223673b14aa6d908e51e71f451b835.tar.gz
UXP-ab174e65d9223673b14aa6d908e51e71f451b835.tar.lz
UXP-ab174e65d9223673b14aa6d908e51e71f451b835.tar.xz
UXP-ab174e65d9223673b14aa6d908e51e71f451b835.zip
Merge pull request #201 from janekptacijarabaci/pm_places_error_1
[PALEMOON] Places - fix: throws an error: 0x80004005 (NS_ERROR_FAILURE) [nsIEditor.transactionManager]
Diffstat (limited to 'application/palemoon/base')
-rw-r--r--application/palemoon/base/content/browser-places.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/application/palemoon/base/content/browser-places.js b/application/palemoon/base/content/browser-places.js
index 5c13a43f9..590fe7ecd 100644
--- a/application/palemoon/base/content/browser-places.js
+++ b/application/palemoon/base/content/browser-places.js
@@ -189,11 +189,24 @@ var StarUI = {
this._itemId = aItemId !== undefined ? aItemId : this._itemId;
this.beginBatch();
- this.panel.openPopup(aAnchorElement, aPosition);
-
+ let onPanelReady = fn => {
+ let target = this.panel;
+ if (target.parentNode) {
+ // By targeting the panel's parent and using a capturing listener, we
+ // can have our listener called before others waiting for the panel to
+ // be shown (which probably expect the panel to be fully initialized)
+ target = target.parentNode;
+ }
+ target.addEventListener("popupshown", function(event) {
+ fn();
+ }, {"capture": true, "once": true});
+ };
gEditItemOverlay.initPanel(this._itemId,
- { hiddenRows: ["description", "location",
+ { onPanelReady,
+ hiddenRows: ["description", "location",
"loadInSidebar", "keyword"] });
+
+ this.panel.openPopup(aAnchorElement, aPosition);
},
panelShown: