Skip to content

Commit 7101ded

Browse files
committed
Don't close drawer when a nested tooltip hides
wa-after-hide from a tooltip inside the drawer (e.g. the exact time tooltip on a persistent notification) bubbled to the wa-drawer listener and was treated as the drawer closing. Only handle the drawer's own event. Fixes #52901
1 parent 527319a commit 7101ded

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/components/ha-drawer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ export class HaDrawer extends LitElement {
9595
}
9696

9797
private _handleAfterHide(ev: Event) {
98+
// Ignore wa-after-hide from nested Web Awesome components (e.g. tooltips)
99+
if (ev.target !== ev.currentTarget) {
100+
return;
101+
}
98102
ev.stopPropagation();
99103
this.open = false;
100104
fireEvent(this, "hass-drawer-closed");

0 commit comments

Comments
 (0)