diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2024-11-15 01:52:04 -0500 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2024-11-15 01:52:04 -0500 |
commit | d00bfda4ffafa8c2119c97217a259d3ef97d0af7 (patch) | |
tree | 85f095133be1aa97fcb184974e639d0a9fd9d357 | |
parent | 80454eeb792f66816c62cdb78c39e0c802f9e7ed (diff) |
Touch testing
-rw-r--r-- | index.html | 2 | ||||
-rw-r--r-- | scripts/gui-common/widgets.js | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -32,7 +32,7 @@ <a class="nav-el" href="?page=automation">Home Automation</a> </nav> - <content> + <content style="height:300vh; flex-direction: column; justify-content: space-evenly;"> </content> <script src="scripts/gui-common/color.js"></script> 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(); } } |