From 72a8635c6faa6022f42c3ac3b5935c95d3cbc901 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Sun, 9 Feb 2025 12:40:24 +0000 Subject: [PATCH] fix opening control accessory modal on mobile devices --- CHANGELOG.md | 1 + ui/src/app/core/directives/longclick.directive.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c540a9a13..45f27950b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ All notable changes to `homebridge-config-ui-x` will be documented in this file. - allow docker users to disable the UI terminal via env - set `HOMEBRIDGE_CONFIG_UI_TERMINAL_ENABLED=0` - note that this has not been extensively tested +- fix opening control accessory modal on mobile devices ### Other Changes diff --git a/ui/src/app/core/directives/longclick.directive.ts b/ui/src/app/core/directives/longclick.directive.ts index 7732305ad..69c58b335 100644 --- a/ui/src/app/core/directives/longclick.directive.ts +++ b/ui/src/app/core/directives/longclick.directive.ts @@ -48,6 +48,12 @@ export class LongClickDirective implements OnDestroy { return } this.done = false + + if (event instanceof TouchEvent) { + event.preventDefault() + event.stopPropagation() + } + this.downTimeout = setTimeout(() => { if (!this.done) { this.done = true