summaryrefslogtreecommitdiffstats
path: root/browser/base
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-02-13 16:57:41 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-02-13 16:57:41 +0100
commitc06b8691e3cc33682fe2b8b614ec36ce0aada079 (patch)
tree37352b1b3b2d476c2d4fc01817acaffda2155032 /browser/base
parent2b6c1f971b486152cbf116452e5f723e2b2d068f (diff)
downloadUXP-c06b8691e3cc33682fe2b8b614ec36ce0aada079.tar
UXP-c06b8691e3cc33682fe2b8b614ec36ce0aada079.tar.gz
UXP-c06b8691e3cc33682fe2b8b614ec36ce0aada079.tar.lz
UXP-c06b8691e3cc33682fe2b8b614ec36ce0aada079.tar.xz
UXP-c06b8691e3cc33682fe2b8b614ec36ce0aada079.zip
Places - throws an error: 0x80004005 (NS_ERROR_FAILURE) [nsIEditor.transactionManager]
Steps to reproduce: 1) The main menu: "Tools" - "Options" - "Privacy" - "History": [x] "Remember my browsing and download history" 2) The main menu: "History" - "Clear Recent History...": "Today"/"Everything" - "Browsing & Download History" - "OK" 3) Go to: "https://www.palemoon.org/" 4) The main menu: "History" - "Show All History" 5) Clicking right mouse button on an item "https://www.palemoon.org" in "History", clicking on "Delete This Page". 6) Clicking on "History": Throws an error in Browser Console: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIEditor.transactionManager] editBookmarkOverlay.js:341
Diffstat (limited to 'browser/base')
-rw-r--r--browser/base/content/browser-places.js33
1 files changed, 16 insertions, 17 deletions
diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js
index 14e90cde2..3a9fb9d96 100644
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -299,24 +299,23 @@ var StarUI = {
parent.setAttribute("open", "true");
}
}
- let panel = this.panel;
- let target = 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 shownListener(event) {
- if (event.target == panel) {
- target.removeEventListener("popupshown", shownListener, true);
-
- gEditItemOverlay.initPanel({ node: aNode
- , hiddenRows: ["description", "location",
- "loadInSidebar", "keyword"]
- , focusedElement: "preferred"});
+ 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;
}
- }, true);
+ target.addEventListener("popupshown", function(event) {
+ fn();
+ }, {"capture": true, "once": true});
+ };
+ gEditItemOverlay.initPanel({ node: aNode
+ , onPanelReady
+ , hiddenRows: ["description", "location",
+ "loadInSidebar", "keyword"]
+ , focusedElement: "preferred"});
this.panel.openPopup(aAnchorElement, aPosition);
}),