-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] PDF viewer flashing when paging #220
Comments
Agreed very disturbing |
I was having a look and needed to untangle a few things to understand what the current state is. First is that react-pdf doesn't seem to reuse canvases, or is just clearing and drawing in separate events I'm not really sure. This caused the primary flicker and seems very unlikely to change. The workaround they give is to leave the previous page up until the next loads. The code currently used likely started here: https://codesandbox.io/p/sandbox/react-pdf-prevent-flash-with-scale-nse51l This fixed one flicker but introduced another for the same reason of updates not happening simultaneously. Now there is page layout flicker from temporary DOM elements pushing things around. A hack that can be done is to force all Page elements to be overlapping or carefully hiding overflow. The stylesheet in Setting I might come back to this. I have an idea of what needs to happen I just don't know react at all. |
Describe the bug
The screen flashes between each page when you quickly click on the "next" link for a PDF OBJKT.
Reproduction
Expected behavior
No flashing when paging a PDF.
Platform and versions
Console output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: