diff --git a/src/panels/lovelace/common/directives/action-handler-directive.ts b/src/panels/lovelace/common/directives/action-handler-directive.ts index d39db84b6be5..ef931d895b9c 100644 --- a/src/panels/lovelace/common/directives/action-handler-directive.ts +++ b/src/panels/lovelace/common/directives/action-handler-directive.ts @@ -149,7 +149,10 @@ class ActionHandler extends HTMLElement implements ActionHandlerType { element.actionHandler.end = (ev: Event) => { // Don't respond when moved or scrolled while touch - if (["touchend", "touchcancel"].includes(ev.type) && this.cancelled) { + if ( + ev.type === "touchcancel" || + (ev.type === "touchend" && this.cancelled) + ) { return; } const target = ev.target as HTMLElement;