swipe bug fix
This commit is contained in:
@@ -59,7 +59,9 @@ if ('serviceWorker' in navigator) {
|
||||
|
||||
document.addEventListener('touchmove', function (e) {
|
||||
if (e.touches.length === 2 && pinchStartDist !== null) {
|
||||
// Two-finger pinch: scale fonts, not viewport
|
||||
// Two-finger pinch: scale fonts, not viewport.
|
||||
// Skip when a lightbox is open — let the browser handle pinch natively there.
|
||||
if (document.documentElement.dataset.lightboxOpen) return;
|
||||
e.preventDefault();
|
||||
const ratio = getTouchDist(e) / pinchStartDist;
|
||||
const newScale = Math.min(MAX_SCALE, Math.max(MIN_SCALE, pinchStartScale * ratio));
|
||||
|
||||
Reference in New Issue
Block a user