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

Form field placements off #2343

Closed
luke-rogers opened this issue May 22, 2024 · 6 comments
Closed

Form field placements off #2343

luke-rogers opened this issue May 22, 2024 · 6 comments
Assignees
Labels
20 scheduled for version 20 bug Something isn't working Confirmed I've managed to reproduce the bug. That's great news: chances are I'll solve it.

Comments

@luke-rogers
Copy link

Describe the bug
Open the attached PDF and notice the form field placements are off:

  • Fields slightly overlap
  • Radios are off centre

The attached PDF renders perfectly when tested on the Mozilla viewer.

Version info
20.0.2

Demo PDF file
Hot Works Permit Template.pdf

@stephanrauh stephanrauh self-assigned this May 22, 2024
@stephanrauh stephanrauh added bug Something isn't working Confirmed I've managed to reproduce the bug. That's great news: chances are I'll solve it. labels May 22, 2024
@stephanrauh
Copy link
Owner

Looks like a CSS problem. Do you know whether it looked better in previous versions?

@stephanrauh stephanrauh added the 20 scheduled for version 20 label May 22, 2024
@luke-rogers
Copy link
Author

We were on v18 before and it was fine. We jumped to v20 so can't say whether it's reproducible on v19.

Happy to test if that would be useful?

@stephanrauh
Copy link
Owner

No, don't bother. Your information already helps me to find the missing CSS. Now I know I don't have to dig infinitely into the past.

@luke-rogers
Copy link
Author

luke-rogers commented May 24, 2024

I think I've managed to track it down to this line of CSS.

Turn it off and the field returns to what I would expect.
image

stephanrauh added a commit that referenced this issue May 24, 2024
…ntroller public to allow users to add custom implementations; #2343 fixed the box-sizing model of the annotation layer (was broken by #2282)
@stephanrauh
Copy link
Owner

Now that's crazy: pdf.js is using both box-sizing models. I'd call it an antipattern. Quite surprising given that the quality of the library is generally exceptionally good.

Be that as it may, I've applied a patch. It might be temporary - I hope I can find a better solution - but for now it solves both your issue and #2282.

Your bug fix has landed with version 20.1.0.

Enjoy!
Stephan

@luke-rogers
Copy link
Author

The fix is working great - thanks for the quick turn around!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
20 scheduled for version 20 bug Something isn't working Confirmed I've managed to reproduce the bug. That's great news: chances are I'll solve it.
Projects
None yet
Development

No branches or pull requests

2 participants