Closed Bug 1509389 Opened Last year Closed Last year

Installation of extension with browser_action destroys toolbar

Categories

(Thunderbird :: Add-Ons: General, defect)

defect
Not set

Tracking

(thunderbird64 fixed, thunderbird65 fixed)

RESOLVED FIXED
Thunderbird 65.0
Tracking Status
thunderbird64 --- fixed
thunderbird65 --- fixed

People

(Reporter: brummolix, Assigned: darktrojan)

Details

Attachments

(2 files, 1 obsolete file)

Attached image empty toolbar.jpg
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0

Steps to reproduce:

- use TB64.0b2 (it was also in beta 1)
- Install an addon which includes a browser_action, for example https://github.com/Brummolix/AutoarchiveReloaded/releases/download/0.9.9.7_beta/AutoArchiveReloaded.0.9.9.7_beta.xpi



Actual results:

The main toolbar (with reply, create, address book, hamburger menu etc.) is emptied, only the extension action is visible (see attached screenshot).

If you close Thunderbird and reopen it, the original toolbar is restored. If you edit the toolbar before closing, the broken state is saved.


Expected results:

The toolbar should be as before (I'm not sure if the extension icon should be added or not)
I *think* I know what causes this, in which case there's already a fix on the way. Was your toolbar in the default state before installing the extension?
You are right, it was in default state. I tried it again. If the toolbar is already changed, the extension button is correctly added at the right side fof the toolbar.
Attached patch 1509389-empty-toolbar-1.diff (obsolete) — Splinter Review
Even though I have this in bug 1509246, it won't be happening there any time soon.
Assignee: nobody → geoff
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #9027441 - Flags: review?(mkmelin+mozilla)
Attachment #9027441 - Flags: approval-comm-beta?
Comment on attachment 9027441 [details] [diff] [review]
1509389-empty-toolbar-1.diff

Review of attachment 9027441 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/components/extensions/ExtensionToolbarButtons.jsm
@@ +144,5 @@
>      }
> +    let currentSet = toolbar.getAttribute("currentset");
> +    if (!currentSet) {
> +      currentSet = toolbar.getAttribute("defaultset");
> +    }

could just make it

let currentSet = toolbar.getAttribute("currentset") || toolbar.getAttribute("defaultset");
Attachment #9027441 - Flags: review?(mkmelin+mozilla) → review+
I suppose the toolbar *could* have an empty current set, so we'd better account for that.
Attachment #9027441 - Attachment is obsolete: true
Attachment #9027441 - Flags: approval-comm-beta?
Attachment #9027774 - Flags: review?(mkmelin+mozilla)
Attachment #9027774 - Flags: approval-comm-beta?
Comment on attachment 9027774 [details] [diff] [review]
1509389-empty-toolbar-2.diff

Review of attachment 9027774 [details] [diff] [review]:
-----------------------------------------------------------------

My suggestion handles that (since falsy...)
No, you misunderstand, the toolbar might be *deliberately empty*. Why, I've no idea, but people are weird.
Attachment #9027774 - Flags: review?(mkmelin+mozilla) → review+
Keywords: checkin-needed
Attachment #9027774 - Flags: approval-comm-beta? → approval-comm-beta+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/ebdff9e20009
Use toolbar default set if current set doesn't exist. r=mkmelin
Status: ASSIGNED → RESOLVED
Closed: Last year
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 65.0
You need to log in before you can comment on or make changes to this bug.