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]: pdf form cannot be filled out #19505

Closed
cadeyrn opened this issue Feb 17, 2025 · 2 comments · Fixed by #19508
Closed

[Bug]: pdf form cannot be filled out #19505

cadeyrn opened this issue Feb 17, 2025 · 2 comments · Fixed by #19508
Assignees
Labels

Comments

@cadeyrn
Copy link

cadeyrn commented Feb 17, 2025

Attach (recommended) or Link to PDF file

In the Firefox support, a user provided us with the following PDF file:
einr_scheck_inl3.pdf

It is not possible to fill in the form fields in this form. In other PDF applications (Adobe Acrobat Online, Apple Preview) and browsers (Chrome, Safari) it works.

Web browser and its version

Firefox 135 / 137 Nightly

Operating system and its version

macOS 15.3 / Windows 10

PDF.js version

PDF.js shipped with Firefox 135 / 137 Nightly

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

Yes

Is a browser extension

No

Steps to reproduce the problem

  1. Open the PDF file
  2. Try to fill out the form fields

What is the expected behavior?

You can fill out the form fields.

What went wrong?

Nothing happens.

Link to a viewer

No response

Additional context

No response

@Snuffleupagus
Copy link
Collaborator

PDF f34a9402cdaec21891650f265516ddb2 [1.4 DKB / -] (PDF.js: 5.0.164 [3f15e0c46]) viewer.mjs:13818:13

ReferenceError: tab_next is not defined
@resource://pdf.js/build/pdf.scripting.mjs line 3889 > eval:1:1
globalEval@resource://pdf.js/build/pdf.scripting.mjs:3889:41
_runActions@resource://pdf.js/build/pdf.scripting.mjs:809:14
runActions@resource://pdf.js/build/pdf.scripting.mjs:1616:23
dispatch@resource://pdf.js/build/pdf.scripting.mjs:1526:10
_dispatchEvent@resource://pdf.js/build/pdf.scripting.mjs:1829:27
initSandbox/<@resource://pdf.js/build/pdf.scripting.mjs:4041:22
viewer.mjs:6793:19

@calixteman
Copy link
Contributor

It's because the tab_next function isn't defined in the pdf.
We shouldn't invalidate the keystroke when the action has thrown.

@calixteman calixteman self-assigned this Feb 17, 2025
calixteman added a commit to calixteman/pdf.js that referenced this issue Feb 17, 2025
It fixes mozilla#19505.

We were invaliding throwing actions (in setting event.rc to false) and all the event process was stopped.
Now we're just dumping the exception in the console: the action is skipped and event.rc is not set
else the input fields aren't updated wit KeyStroke actions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants