Skip to content

pageColors causes white flash while scrolling #2069

@downpogo

Description

@downpogo

Before you start - checklist

  • I followed instructions in documentation written for my React-PDF version
  • I have checked if this bug is not already reported
  • I have checked if an issue is not listed in Known issues
  • If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo

Description

When using the recently added pageColors prop to override PDF text/background colors, I see intermittent white flashes while scrolling through pages.

Screen.Recording.2026-02-23.143828.mp4

Steps to reproduce

  1. Go to https://zathura.downpogo.workers.dev
  2. Open a PDF by pressing o
  3. Scroll through the PDF

Here's the code

Expected behavior

Pages should keep the configured pageColors continuously while scrolling, without flashing white between renders.

Actual behavior

While scrolling, some pages briefly flash white before returning to the configured colors.

Additional information

No response

Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions