Todo button menu: add stop propagation (#20996)

This commit is contained in:
karwosts 2024-06-05 02:43:21 -07:00 committed by GitHub
parent cd73b8ac29
commit 4e8de1f64d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,6 +26,7 @@ import { repeat } from "lit/directives/repeat";
import memoizeOne from "memoize-one"; import memoizeOne from "memoize-one";
import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element";
import { supportsFeature } from "../../../common/entity/supports-feature"; import { supportsFeature } from "../../../common/entity/supports-feature";
import { stopPropagation } from "../../../common/dom/stop_propagation";
import "../../../components/ha-card"; import "../../../components/ha-card";
import "../../../components/ha-check-list-item"; import "../../../components/ha-check-list-item";
import "../../../components/ha-checkbox"; import "../../../components/ha-checkbox";
@ -243,7 +244,7 @@ export class HuiTodoListCard extends LitElement implements LovelaceCard {
${this.todoListSupportsFeature( ${this.todoListSupportsFeature(
TodoListEntityFeature.MOVE_TODO_ITEM TodoListEntityFeature.MOVE_TODO_ITEM
) )
? html`<ha-button-menu> ? html`<ha-button-menu @closed=${stopPropagation}>
<ha-icon-button <ha-icon-button
slot="trigger" slot="trigger"
.path=${mdiDotsVertical} .path=${mdiDotsVertical}
@ -287,7 +288,7 @@ export class HuiTodoListCard extends LitElement implements LovelaceCard {
${this.todoListSupportsFeature( ${this.todoListSupportsFeature(
TodoListEntityFeature.DELETE_TODO_ITEM TodoListEntityFeature.DELETE_TODO_ITEM
) )
? html`<ha-button-menu> ? html`<ha-button-menu @closed=${stopPropagation}>
<ha-icon-button <ha-icon-button
slot="trigger" slot="trigger"
.path=${mdiDotsVertical} .path=${mdiDotsVertical}