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

[Bug]: `position: sticky` Header occur flickering when navigate back

Open toy-crane opened this issue 3 years ago • 1 comments

What version of React Router are you using?

6.4.2

Steps to Reproduce

when I navigate to other page with Link Component at the center of the page, and back to page. there is flickering on the header component.

is this CSR problem or React router problem?

I think position: sticky attribute need full content height. but CSR does`t know height before JS load.

if it`s right, is there any work around??

reference: https://github.com/remix-run/react-router/issues/new?assignees=&labels=bug&template=bug_report.yml&title=%5BBug%5D%3A+

Expected Behavior

header don`t flickering.

Actual Behavior

back to page at center of page, header flickering occur.

toy-crane avatar Oct 26 '22 10:10 toy-crane

This sounds like a CSS/layout problem in your app, it's unlikely related to the React Router navigation. But if you can provide a reproduction in codesandbox or stackblitz, I'm happy to take a look!

brophdawg11 avatar Oct 26 '22 13:10 brophdawg11

Yeah what @brophdawg11 said is right , this kind of UI is related to layout issue, I would be happy if you can produce samplenin code sandbox or stack blitz.

AdamJamiu avatar Jan 20 '23 15:01 AdamJamiu

Closing as no feedback was provided.

machour avatar Jan 20 '23 15:01 machour