Skip to content

Commit

Permalink
fix opening control accessory modal on mobile devices
Browse files Browse the repository at this point in the history
  • Loading branch information
bwp91 committed Feb 9, 2025
1 parent 9c6fa26 commit 72a8635
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions ui/src/app/core/directives/longclick.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 72a8635

Please sign in to comment.