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