Skip to content

Commit ad32212

Browse files
danilsomsikovDevtools-frontend LUCI CQ
authored andcommitted
Do not create toolbar item on the subsequent connectedCallback invocations
Otherwise we end up with repeated icons. Bug: 400939386 Change-Id: I2f6b886262b7e5374c28c21dfacfd26bbaf00847 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6328141 Auto-Submit: Danil Somsikov <[email protected]> Commit-Queue: Danil Somsikov <[email protected]> Reviewed-by: Alex Rudenko <[email protected]>
1 parent 2f91327 commit ad32212

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

front_end/ui/legacy/Toolbar.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,9 @@ class ToolbarInputElement extends HTMLElement {
866866
datalist: HTMLDataListElement|null = null;
867867

868868
connectedCallback(): void {
869+
if (this.item) {
870+
return;
871+
}
869872
const list = this.getAttribute('list');
870873
if (list) {
871874
this.datalist = (this.getRootNode() as ShadowRoot | Document).querySelector(`datalist[id="${list}"]`);

0 commit comments

Comments
 (0)