Up-in-the-Air – commitdiff

You can use Git to clone the repository via the web URL. Download snapshot (zip)
Using the virtual thumb stick should no longer accidentally select text
authorJulian Fietkau <git@fietkau.software>
Thu, 26 Sep 2024 23:13:18 +0000 (01:13 +0200)
committerJulian Fietkau <git@fietkau.software>
Thu, 26 Sep 2024 23:13:18 +0000 (01:13 +0200)
main.js

diff --git a/main.js b/main.js
index 1e80baf29791ecb02e446fc0f80694b07a774e2b..1118be2624f0d9499f5f6293500b425fd1d185e4 100644 (file)
--- a/main.js
+++ b/main.js
@@ -381,6 +381,7 @@ function init(game, canvas) {
     if(game.settings['controls'] == 'thumbstick') {
       if(e.target.closest('.virtual-input-widget') == game.ui.virtualInput) {
         game.ui.virtualInput.inProgress = true;
+        e.preventDefault();
       } else {
         game.ui.virtualInput.inProgress = false;
       }
@@ -398,6 +399,7 @@ function init(game, canvas) {
     if(game.settings['controls'] == 'thumbstick') {
       if(e.target.closest('.virtual-input-widget') == game.ui.virtualInput) {
         game.ui.virtualInput.inProgress = true;
+        e.preventDefault();
       } else {
         game.ui.virtualInput.inProgress = false;
       }