Skip to content

[Bug]: Comment sidebar is not cleared on document switch #20219

@timvandermeij

Description

@timvandermeij

Attach (recommended) or Link to PDF file

N/A (any PDF file works)

Web browser and its version

Firefox 142.0.1

Operating system and its version

Arch Linux

PDF.js version

5.4.149 (and latest master)

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

No

Steps to reproduce the problem

  1. Open http://54.241.84.105:8877/3320d9aab0534e5/web/viewer.html, the latest preview from PR [Editor] Add a sidebar allowing the user to navigate between the comments in a pdf (bug 1985567) #20210.
  2. Open the comment sidebar. Notice that there is a single "Add a comment by selecting..." hint text.
  3. Open a new PDF document.
  4. Open the comment sidebar. Notice that there are now two "Add a comment by selecting..." hint texts.
  5. Every time these steps are repeated a new hint text is added.

What is the expected behavior?

One hint text is added for all documents:

Image

What went wrong?

One hint text is added per opened document:

Image

Link to a viewer

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions