From d00bfda4ffafa8c2119c97217a259d3ef97d0af7 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Fri, 15 Nov 2024 01:52:04 -0500 Subject: Touch testing --- index.html | 2 +- scripts/gui-common/widgets.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index c075753..52fb7ff 100644 --- a/index.html +++ b/index.html @@ -32,7 +32,7 @@ Home Automation - + diff --git a/scripts/gui-common/widgets.js b/scripts/gui-common/widgets.js index 3dda499..0591da6 100644 --- a/scripts/gui-common/widgets.js +++ b/scripts/gui-common/widgets.js @@ -85,6 +85,7 @@ class Widget extends EventTarget{ this.dispatchEvent(new CustomEvent("inactive", {detail: {widget: this, event: new TouchEvent(event.type, event)}})); else this.dispatchEvent(new TouchEvent(event.type, event)); + event.preventDefault(); } /** @param {Event} event */ @@ -388,6 +389,7 @@ class WidgetDragable extends Widget #touch(event) { console.log(event.type, event.changedTouches); + event.preventDefault(); } } -- cgit v1.2.3