Closed Bug 1628395 Opened 5 years ago Closed 5 years ago

customizeToolbar can end up with multiple separators, springs and spacers

Categories

(Thunderbird :: Toolbars and Tabs, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 77.0

People

(Reporter: iannbugzilla, Assigned: iannbugzilla)

References

Details

Attachments

(1 file, 1 obsolete file)

When a user is customising toolbars they can end up with multiple separators, springs and spacers as each one is now given a unique id in the UI.
STR
1/ Use recent Thunderbird (TB 68.5.0 on Fedora)
2/ Customise a toolbar by adding separators, springs and spacers to it.
3/ Select "Restore Default Set"

Expected Result
1/ Unique set of toolbar elements in dialog

Actual Result
1/ Duplicate elements for separators, springs and spacers.

Attached patch Fix customizeToolbar code (obsolete) — Splinter Review

Simple check to see if it is a separator, spring or spacer before adding it to the palette

Attachment #9139197 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9139197 [details] [diff] [review] Fix customizeToolbar code Review of attachment 9139197 [details] [diff] [review]: ----------------------------------------------------------------- LGTM thx! r=mkmelin ::: common/src/customizeToolbar.js @@ +317,5 @@ > var currentItems = getCurrentItemIds(); > templateNode = gToolbox.palette.firstElementChild; > while (templateNode) { > // Check if the item is already in a toolbar before adding it to the palette. > + if (!isSpecialItem(templateNode) && !(templateNode.id in currentItems)) { Please also add a comment like // But don't add back spaces, separators and such - we don't want them duplicated.
Attachment #9139197 - Flags: review?(mkmelin+mozilla) → review+

Updated comment in code, carrying forward r+

Attachment #9139197 - Attachment is obsolete: true
Attachment #9139210 - Flags: review+
Attachment #9139210 - Attachment is patch: true
Target Milestone: --- → Thunderbird 77.0

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/8260fafb8741
customizeToolbar can end up with multiple separators, springs and spacers. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: