Bug 1313876 - Fixed _undoCloseMiddleClick function call in event listener. r?jaws draft
authorDavid Malaschonok <davidmalaschonok@gmail.com>
Sun, 30 Oct 2016 11:29:24 +0100
changeset 431563 2f78e0f736c8736902828ff32050f980587bb3eb
parent 431500 969c3295d3aa77931cca26eddb047d9d74bd9858
child 431564 a2414a60c2ebb82bf64c81ad33a067d14e582fc4
push id34064
push userbmo:davidmalaschonok@gmail.com
push dateSun, 30 Oct 2016 10:30:53 +0000
reviewersjaws
bugs1313876
milestone52.0a1
Bug 1313876 - Fixed _undoCloseMiddleClick function call in event listener. r?jaws MozReview-Commit-ID: 3hkpkldzxRW
browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm
--- a/browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm
+++ b/browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm
@@ -164,17 +164,17 @@ function createEntry(aTagName, aIsWindow
   tabData = aIsWindowsFragment ? aClosedTab
                      : aClosedTab.state;
   let activeIndex = (tabData.index || tabData.entries.length) - 1;
   if (activeIndex >= 0 && tabData.entries[activeIndex]) {
     element.setAttribute("targetURI", tabData.entries[activeIndex].url);
   }
 
   if (!aIsWindowsFragment) {
-    element.addEventListener("click", this._undoCloseMiddleClick, false);
+    element.addEventListener("click", RecentlyClosedTabsAndWindowsMenuUtils._undoCloseMiddleClick, false);
   }
   if (aIndex == 0) {
     element.setAttribute("key", "key_undoClose" + (aIsWindowsFragment? "Window" : "Tab"));
   }
 
   aFragment.appendChild(element);
 }
 
@@ -206,9 +206,9 @@ function createRestoreAllEntry(aDocument
                                   "for (var i = 0; i < " + aEntryCount + "; i++) undoClose" +
                                     (aIsWindowsFragment? "Window" : "Tab") + "();");
   if (aPrefixRestoreAll) {
     aFragment.insertBefore(restoreAllElements, aFragment.firstChild);
   } else {
     aFragment.appendChild(aDocument.createElementNS(kNSXUL, "menuseparator"));
     aFragment.appendChild(restoreAllElements);
   }
-}
+}
\ No newline at end of file