mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Fix action handler for touch (#6775)
* Fix action handler for touch * Console
This commit is contained in:
parent
6f673359ff
commit
1997e63b7c
@ -150,13 +150,13 @@ class ActionHandler extends HTMLElement implements ActionHandler {
|
|||||||
}
|
}
|
||||||
// Prevent mouse event if touch event
|
// Prevent mouse event if touch event
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
|
if (options.hasHold) {
|
||||||
if (
|
if (
|
||||||
["touchend", "touchcancel"].includes(ev.type) &&
|
["touchend", "touchcancel"].includes(ev.type) &&
|
||||||
this.timer === undefined
|
this.timer === undefined
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (options.hasHold) {
|
|
||||||
clearTimeout(this.timer);
|
clearTimeout(this.timer);
|
||||||
this.stopAnimation();
|
this.stopAnimation();
|
||||||
this.timer = undefined;
|
this.timer = undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user