Sometimes I hate coding

This commit is contained in:
Michał Gdula 2023-04-19 18:11:19 +00:00
parent f26e76d822
commit 341d5b0ee8
3 changed files with 7 additions and 6 deletions

View file

@ -52,10 +52,10 @@ function tabDragStart(event) {
uploadTab.classList.add("dragging");
document.addEventListener('touchmove', event => {
document.addEventListener('touchmove', moving => {
if (uploadTab.classList.contains("dragging")) {
if (event.touches[0].clientY - offset >= 0) {
uploadTab.dataset.lastY = event.touches[0].clientY;
if (moving.touches[0].clientY - offset >= 0) {
uploadTab.dataset.lastY = moving.touches[0].clientY;
} else {
uploadTab.dataset.lastY = offset;
}