react-router icon indicating copy to clipboard operation
react-router copied to clipboard

[Bug]: Blink on fast left/right swipes in mobile

Open sh3l6orrr opened this issue 1 year ago • 1 comments

What version of React Router are you using?

v6.20.1

Steps to Reproduce

I had this issue with my own app built with react router, but I found that it also exists on the react router official site.

Use iPhone/iPad to browse https://reactrouter.com (with either Safari or Chrome), click What's New?, then perform a fast left swipe. After going back to the home page, perform a fast right swipe. Repeat several times.

Expected Behavior

Swipes should be smooth navigations with no unexpected behaviors.

Actual Behavior

The page blinks within 1 second whenever a swipe is performed.

  1. The issue also persists on ipad, but not mac.
  2. If the swipe goes slower then there's likely no flicker.
  3. Using the forward/back button will not lead to a flicker.
  4. The flicker happens most intensively when swiping from a page with a list of items.
  5. I tried global pending UI, but it does not help.
  6. I tested also on https://react.dev/, there's no flicker.

sh3l6orrr avatar Dec 17 '23 09:12 sh3l6orrr

It looks more like a Safari bug with client-side routing. Some cache issues on swipes

imwexpex avatar Feb 13 '24 11:02 imwexpex