Skip to content
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]: Annotations Become Visible After Closing the Annotation Editor #19134

Open
rajatsingh23 opened this issue Nov 30, 2024 · 3 comments
Open
Labels

Comments

@rajatsingh23
Copy link

rajatsingh23 commented Nov 30, 2024

Attach (recommended) or Link to PDF file

test-1.pdf

Web browser and its version

Firefox 133.0

Operating system and its version

Window 11

PDF.js version

v4.8.69

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

Yes

Is a browser extension

No

Steps to reproduce the problem

  1. Open test-1.pdf in Mozilla Firefox that supports annotations (e.g., a PDF file).
  2. Activate the annotation editor by clicking highlight on the toolbar.
  3. Click on the "Show All" button
  4. Close the annotation editor by clicking on the highlight

What is the expected behavior?

The annotations should remain hidden after closing the editor. But the annotations become visible while the "Show All" button is clicked

What went wrong?

annotation.mp4

Link to a viewer

No response

Additional context

No response

Tasks

Preview Give feedback
No tasks being tracked yet.
@rajatsingh23
Copy link
Author

"I am interested in fixing this issue myself and would like guidance if needed."

@calixteman
Copy link
Contributor

"I am interested in fixing this issue myself and would like guidance if needed."

Please try to fix it.
Clicking on show all will lead to execute this function:

case AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL:

When some existing highlights are edited we just redraw the page without those annotations and then we create some new Highlight objects thanks:
static async deserialize(data, parent, uiManager) {

When the edit mode is enabled/disabled we call:

and

@rajatsingh23
Copy link
Author

I am new to open source contributions this is my first issue therefore it would be great if you could provide some more instructions to solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants