Opened 3 years ago

Last modified 3 years ago

#13378 reopened defect

Addon icons get added/reordered in the toolbar

Reported by: mikeperry Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Keywords: tbb-usability, ff31-esr
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


In #13318, we tried to set a specific ordering of our addons by setting browser.uiCustomization.state. Unfortunately, because our addons get installed at browser first run, this pref is getting altered and addons are installing themselves into the toolbar anyway, and in an order we do not control. This causes the browser.uiCustomization.state pref to get reset.

Ideally, we'd be able to enforce this pref's original values upon addons after their installation. Unfortunately, resetting this pref to its original default value does not take effect until after browser restart. We need to somehow tell the browser to reorganize the addons back to this default state after their installation.

Child Tickets

Change History (5)

comment:1 Changed 3 years ago by mikeperry

This might be as simple as setting browser.uiCustomization.autoAdd to false, though that may have side effects for other user-installed addons.

Another workaround might be to call CustomizableUI.reset() or manually clear the browser.uiCustomization.state pref and then call CustomizableUI.loadSavedState(). The Tor Launcher Wizard UI or the code in torbutton_init() that sets "inserted_button" might be good places to do such a workaround.

Access to CustomizableUI is obtained via something like:

const { CustomizableUI } = Cu.import('resource:///modules/CustomizableUI.jsm', {});

Though it may already be available in the browser.xul scope in Torbutton's case.

comment:2 Changed 3 years ago by mikeperry

Resolution: fixed
Status: newclosed

Ok, I have an ugly hack for this in Torbutton's origin/master. Instead of trying to add ourselves to the toolbar, we now clear the browser.uiCustomization.state pref and then reset and undo reset for the UI state. This causes the toolbar to get reloaded based on the default value of this pref.

Torbutton will have this fix, as will 4.0-stable, unless it breaks something else.

comment:3 Changed 3 years ago by mikeperry

Keywords: ff31-esr added

comment:4 Changed 3 years ago by mikeperry

Resolution: fixed
Status: closedreopened

And this just happened on a new TBB install I just did on Linux that should have this fix. Not sure why. Perhaps HTTPS-Everywhere got installed after Torbutton's code ran? Ugh.

comment:5 Changed 3 years ago by mikeperry

Keywords: TorBrowserTeam201410 removed
Note: See TracTickets for help on using tickets.