fix(mobile): screens with pull-to-refresh bounce like every other iOS list

The dashboard, journeys and notifications switched the iOS bounce off entirely so it would not race the pull. The pull now holds only a clearly downward move from the very top, from its first pixel, and the page bounces everywhere else, its end included. TestFlight feedback, 5.1.3.
This commit is contained in:
Maurice
2026-11-11 20:41:25 +00:00
parent 768fd6f439
commit 102e2141ec
3 changed files with 31 additions and 17 deletions
@@ -92,4 +92,23 @@ describe('usePullToRefresh', () => {
touch('touchend');
expect(onRefresh).not.toHaveBeenCalled();
});
it('holds a clearly downward move at the top from its first pixel, so the bounce does not start under the pull', () => {
setup();
touch('touchstart', 100, 100);
expect(touch('touchmove', 100, 103).defaultPrevented).toBe(true);
touch('touchend');
});
it('leaves the bounce everywhere else: a sideways start, and the page once it is scrolled', () => {
setup();
touch('touchstart', 100, 100);
expect(touch('touchmove', 104, 102).defaultPrevented).toBe(false);
touch('touchend');
Object.defineProperty(window, 'scrollY', { value: 300, configurable: true });
touch('touchstart', 100, 100);
expect(touch('touchmove', 100, 103).defaultPrevented).toBe(false);
touch('touchend');
expect(document.documentElement.hasAttribute('data-pull-refresh')).toBe(false);
});
});