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
This commit is contained in:
committed by
GitHub
parent
0df6826c91
commit
df51b80e07
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user