Bug 1444244 - Fix location where Addon's "Preferences" tab is opened; r?aswan draft
authorArjun Krishna Babu <arjunkrishnababu96@gmail.com>
Thu, 08 Mar 2018 21:06:29 -0700
changeset 765137 6c9b92d4969589ea741d28ef66b6d4653b539a87
parent 765132 31a33fc619562e5b326585c6864d86832dac5126
push id101980
push userbmo:arjunkrishnababu96@gmail.com
push dateFri, 09 Mar 2018 04:07:53 +0000
reviewersaswan
bugs1444244
milestone60.0a1
Bug 1444244 - Fix location where Addon's "Preferences" tab is opened; r?aswan Addon's "Preferences" tab was opening up to the right of ALL tabs rather than next to the current tab. This behavior has been corrected, and the aforementioned tab is now placed relative to the opening tab. MozReview-Commit-ID: APiUR9VkEEt
toolkit/mozapps/extensions/content/extensions.js
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -1528,16 +1528,17 @@ function hasInlineOptions(aAddon) {
   return aAddon.optionsType == AddonManager.OPTIONS_TYPE_INLINE_BROWSER ||
          aAddon.type == "plugin";
 }
 
 function openOptionsInTab(optionsURL) {
   let mainWindow = getMainWindow();
   if ("switchToTabHavingURI" in mainWindow) {
     mainWindow.switchToTabHavingURI(optionsURL, true, {
+      relatedToCurrent: true,
       triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
     });
     return true;
   }
   return false;
 }
 
 function formatDate(aDate) {