From e37201f84f119646c7018ba729a5d32b0c874b1c Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Fri, 1 Nov 2019 10:39:53 -0500 Subject: [PATCH] enter is registering as double_tap (#4161) * enter is registering as double_tap * Update long-press-directive.ts * Update long-press-directive.ts --- src/panels/lovelace/common/directives/long-press-directive.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/lovelace/common/directives/long-press-directive.ts b/src/panels/lovelace/common/directives/long-press-directive.ts index 832721068b..37df395ea0 100644 --- a/src/panels/lovelace/common/directives/long-press-directive.ts +++ b/src/panels/lovelace/common/directives/long-press-directive.ts @@ -123,7 +123,7 @@ class LongPress extends HTMLElement implements LongPress { if (this.held) { element.dispatchEvent(new Event("ha-hold")); } else if (options.hasDoubleClick) { - if ((ev as MouseEvent).detail === 1) { + if ((ev as MouseEvent).detail === 1 || ev.type === "keyup") { this.dblClickTimeout = window.setTimeout(() => { element.dispatchEvent(new Event("ha-click")); }, 250);