diff --git a/src/panels/lovelace/common/directives/long-press-directive.ts b/src/panels/lovelace/common/directives/long-press-directive.ts index 718ccbafab..879a0f3089 100644 --- a/src/panels/lovelace/common/directives/long-press-directive.ts +++ b/src/panels/lovelace/common/directives/long-press-directive.ts @@ -110,7 +110,8 @@ class LongPress extends HTMLElement implements LongPress { const clickEnd = (ev: Event) => { if ( this.cooldownEnd || - (ev instanceof TouchEvent && this.timer === undefined) + (["touchend", "touchcancel"].includes(ev.type) && + this.timer === undefined) ) { return; }