stacker.news icon indicating copy to clipboard operation
stacker.news copied to clipboard

fix refresh on Android PWA

Open pory-gone opened this issue 1 month ago • 0 comments

Description

fix #2658

Fixed three PWA Pull-To_refresh bugs on Android Chrome. Added e.preventDefault() in handleTouchMove to block native PTR, also added { passive: false } to touch event listeners required for prefentDefault. Called NProgress.done() before router.replace() to prevent multiple loading bars. Changed from router.push() to router.replace() for cleaner navigation.

Screenshots

https://github.com/user-attachments/assets/00de4b0f-2ec7-49c3-aef5-afb0abdd58df

Additional Context

The fix was tested on Android PWA standalone mode via cloudflare tunnel. Added a timeout for the pull down to prevent the PTR native of chrome to appear.

Checklist

Are your changes backward compatible? Please answer below: Yes

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below: 8/10

For frontend changes: Tested on mobile, light and dark mode? Please answer below: Tested on Android mobile PWA in both modes.

Did you introduce any new environment variables? If so, call them out explicitly here: NaN

Did you use AI for this? If so, how much did it assist you? I used AI to understand how to test the PWA standalone on my phone

pory-gone avatar Nov 26 '25 18:11 pory-gone