Bug 1534256 - actually open the right help topic page, r=jaws a=lizzard
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Mon, 11 Mar 2019 14:11:53 +0000
changeset 516355 9faa04ade14af2a14d05bed419678b35eca8911c
parent 516354 15f10287a218572a7fd47acabb40208645b4462d
child 516356 6c270c1fddd04fe20d5e756b05b390cc6c3bd7e2
push id1957
push userarchaeopteryx@coole-files.de
push dateMon, 11 Mar 2019 18:03:35 +0000
treeherdermozilla-release@506f35a82fa7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, lizzard
bugs1534256
milestone66.0
Bug 1534256 - actually open the right help topic page, r=jaws a=lizzard Differential Revision: https://phabricator.services.mozilla.com/D22973
browser/base/content/utilityOverlay.js
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -968,23 +968,19 @@ function openHelpLink(aHelpTopic, aCalle
   var url = getHelpLinkURL(aHelpTopic);
   var where = aWhere;
   if (!aWhere)
     where = aCalledFromModal ? "window" : "tab";
 
   openTrustedLinkIn(url, where);
 }
 
-function openPrefsHelp() {
-  // non-instant apply prefwindows are usually modal, so we can't open in the topmost window,
-  // since its probably behind the window.
-  var instantApply = Services.prefs.getBoolPref("browser.preferences.instantApply");
-
-  var helpTopic = document.documentElement.getAttribute("helpTopic");
-  openHelpLink(helpTopic, !instantApply);
+function openPrefsHelp(aEvent) {
+  let helpTopic = aEvent.target.getAttribute("helpTopic");
+  openHelpLink(helpTopic);
 }
 
 function trimURL(aURL) {
   // This function must not modify the given URL such that calling
   // nsIURIFixup::createFixupURI with the result will produce a different URI.
 
   // remove single trailing slash for http/https/ftp URLs
   let url = aURL.replace(/^((?:http|https|ftp):\/\/[^/]+)\/$/, "$1");