mozilla / mozilla/pdf.js

[Bug]: Toolbars not being dismissed after using tool in different pages, having deleted a page

Open
#21,241 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

split-merge-organize
Dominant language
JavaScript
Stars
53.9k
Forks
10.7k
Avg merge
18h 38m
Merged PRs (30d)
130

Description

Attach (recommended) or Link to PDF file

test.pdf

Web browser and its version

Firefox, Version 150.0.2 (64-bit)

Operating system and its version

Windows 11, Version 10.0.26100

PDF.js version

The one bundled with the Firefox version mentioned above

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

Yes

Is a browser extension

No

Steps to reproduce the problem
  1. Open the attached PDF
  2. Draw to page 3
  3. Delete page 8
  4. Draw to page 2
  5. Draw to page 4
What is the expected behavior?

Drawing in page 4 should dismiss the draw toolbar in page 2 and should create the draw in page 4.

Image
What went wrong?

The toolbar in page 2 was not dismissed, and the drawing in page 4 did not start.

Image
Link to a viewer

No response

Additional context

Creating more drawings like this, result in UI cluttering from un-dismissable toolbars. But, the toolbars are dismissing correctly when drawing sequentially different drawings, in the same page .

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the sequence in the PDF.js viewer: draw on page 3, delete page 8, then draw on pages 2 and 4. Inspect the drawing toolbar behavior when switching pages after deletion. Done means the toolbar on page 2 is dismissed and drawing begins on page 4 without leaving un-dismissable toolbars behind.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.