diff --git a/packages/main/src/ToolbarButton.ts b/packages/main/src/ToolbarButton.ts index 187626692ad..895242d0e4c 100644 --- a/packages/main/src/ToolbarButton.ts +++ b/packages/main/src/ToolbarButton.ts @@ -156,6 +156,13 @@ class ToolbarButton extends ToolbarItem { @property() width?: string; + onEnterDOM() { + const toolbar = this.parentElement as HTMLElement; + this._getRealDomRef = () => { + return toolbar.shadowRoot!.querySelector(`[data-ui5-stable="${this.stableDomRef}"]`)!; + }; + } + get styles() { return { width: this.width,