From df51b80e07389a539e83eb79649cccc58d90de4e Mon Sep 17 00:00:00 2001 From: Christophe Gagnier Date: Fri, 8 Jan 2021 10:49:56 -0500 Subject: [PATCH] Fix swipe behavior on firefox when clicking on palette selection input (#1631) * Fix swipe behavior on firefox when clicking on palette selection input When clicking on the palette select element on firefox, it would often swipe to the next tab due to a bug in firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1410816 * Update UI .h files and remove console log --- wled00/data/index.js | 9 ++++-- wled00/html_settings.h | 4 +-- wled00/html_ui.h | 63 +++++++++++++++++++++--------------------- 3 files changed, 40 insertions(+), 36 deletions(-) diff --git a/wled00/data/index.js b/wled00/data/index.js index 4a71cf9d..15f6df5d 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -1334,10 +1334,13 @@ function lock(e) { function move(e) { if(!locked || pcMode) return; - var dx = unify(e).clientX - x0, s = Math.sign(dx), - f = +(s*dx/w).toFixed(2); + var clientX = unify(e).clientX; + var dx = clientX - x0; + var s = Math.sign(dx); + var f = +(s*dx/w).toFixed(2); - if((iSlide > 0 || s < 0) && (iSlide < N - 1 || s > 0) && + if((clientX != 0) && + (iSlide > 0 || s < 0) && (iSlide < N - 1 || s > 0) && f > 0.12 && d.getElementsByClassName("tabcontent")[iSlide].scrollTop == scrollS) { _C.style.setProperty('--i', iSlide -= s); diff --git a/wled00/html_settings.h b/wled00/html_settings.h index d6d72cb1..318205bc 100644 --- a/wled00/html_settings.h +++ b/wled00/html_settings.h @@ -364,10 +364,10 @@ HTTP traffic is unencrypted. An attacker in the same network can intercept form
Enable ArduinoOTA:

About

WLED version 0.11.1

Contributors, dependencies and special thanks
A huge thank you to everyone who helped me create WLED!

-(c) 2016-2020 Christian Schwinne
Licensed under the Licensed under the MIT license

Server message: Response error!