mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1801678 - Compute the right insertion point for a browser action widget when the toolbar is overflowed. r=Gijs
We have a function, OverflowableToolbar.findOverflowedInsertionPoints, whose job it is to compute the right insertion point for a widget if the widget is being inserted into an overflowable toolbar. That function failed to account for the possibility that the widget was a browser action, and would return the #defaultList instead of the #webExtList if the item was overflowing. This patch checks the ID of the widget first, and then supplies the correct list. Differential Revision: https://phabricator.services.mozilla.com/D162586
This commit is contained in:
parent
62b8b0976b
commit
1dea2f808d
@ -5611,9 +5611,13 @@ class OverflowableToolbar {
|
||||
}
|
||||
}
|
||||
|
||||
let overflowList = CustomizableUI.isWebExtensionWidget(aNode.id)
|
||||
? this.#webExtList
|
||||
: this.#defaultList;
|
||||
|
||||
let containerForAppending =
|
||||
this.#overflowedInfo.size && newNodeCanOverflow
|
||||
? this.#defaultList
|
||||
? overflowList
|
||||
: this.#target;
|
||||
return [containerForAppending, null];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user