v0.12.9 bug fixes (FCM and list ordering)
This commit is contained in:
@@ -66,10 +66,21 @@ if ('serviceWorker' in navigator) {
|
||||
currentScale = Math.round(newScale * 100) / 100;
|
||||
document.documentElement.style.setProperty('--font-scale', currentScale);
|
||||
} else if (e.touches.length === 1 && isStandalone) {
|
||||
// Single finger: block pull-to-refresh at top of page
|
||||
// Single finger: block pull-to-refresh only when no scrollable ancestor
|
||||
// has scrolled content above the viewport.
|
||||
// Without this ancestor check, document.scrollTop is always 0 in this
|
||||
// flex layout, so the naive condition blocked ALL upward swipes (dy > 0),
|
||||
// making any scroll container impossible to scroll back up after reaching
|
||||
// the bottom — freezing the window.
|
||||
const dy = e.touches[0].clientY - singleStartY;
|
||||
if (dy > 0 && document.documentElement.scrollTop === 0 && document.body.scrollTop === 0) {
|
||||
e.preventDefault();
|
||||
if (dy > 0) {
|
||||
let el = e.target;
|
||||
let canScrollUp = false;
|
||||
while (el && el !== document.documentElement) {
|
||||
if (el.scrollTop > 0) { canScrollUp = true; break; }
|
||||
el = el.parentElement;
|
||||
}
|
||||
if (!canScrollUp) e.preventDefault();
|
||||
}
|
||||
}
|
||||
}, { passive: false });
|
||||
|
||||
Reference in New Issue
Block a user