diff --git a/devtools/client/framework/toolbox-tabs-order-manager.js b/devtools/client/framework/toolbox-tabs-order-manager.js index 54aa0cb972ff..b7278902a61b 100644 --- a/devtools/client/framework/toolbox-tabs-order-manager.js +++ b/devtools/client/framework/toolbox-tabs-order-manager.js @@ -25,6 +25,13 @@ class ToolboxTabsOrderManager { destroy() { Services.prefs.removeObserver(PREFERENCE_NAME, this.onOrderUpdated); + + // Save the reordering preference, because some tools might be removed. + const ids = + this.currentPanelDefinitions.map(definition => definition.extensionId || definition.id); + const pref = ids.join(","); + Services.prefs.setCharPref(PREFERENCE_NAME, pref); + this.onMouseUp(); }