Bug 1534256 - actually open the right help topic page, r=jaws
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Mon, 11 Mar 2019 14:11:53 +0000
changeset 524371 af2e51990c3d4b650c95b56e705eb6c9e051282b
parent 524370 2f2a20c16289b0dbd0faff84deca0e23782d6acd
child 524372 54607c04892980fee451c6e90718755a012048d0
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1534256
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1534256 - actually open the right help topic page, r=jaws 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
@@ -1030,23 +1030,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");