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

Dropdown Menu Bug? #82

Closed
strlys opened this issue Dec 12, 2023 · 3 comments
Closed

Dropdown Menu Bug? #82

strlys opened this issue Dec 12, 2023 · 3 comments
Labels
bug Something isn't working deferred Awaiting bug fix in another project pdfjs-bug

Comments

@strlys
Copy link

strlys commented Dec 12, 2023

I’m using a Mr. Gone’s Vampire 3rd edition PDF character sheet (here's the download link), and replacing the character sheet from the WoD v20 system.

So, even when I check the PDF Pager option "Read Fields from PDF", some fields are not read and displayed. In my case, 'dropdown menu fields' are not displayed and are basically blank. This only happens if I write something other than one of the dropdown menu choices, and PDF Pager does not give me the ability to write my own text in these fields, even when I don't have the "Read Fields from PDF" checked.

Here's some demonstration:

Original PDF:
image

PDF Pager:
image

Am I doing something wrong, or this is a bug?

Thanks for the awesome module, and I hope you can help me with this!

@strlys strlys changed the title Dropdown Dropdown Menu Bug? Dec 12, 2023
@farling42
Copy link
Owner

Thanks for the download link. I will need to investigate how the drop-down boxes that also allow manual text input work.

@farling42 farling42 added the bug Something isn't working label Dec 13, 2023
@farling42
Copy link
Owner

farling42 commented Dec 28, 2023

Not being able to enter text into the boxes which also provide an optional drop-down menu is a limitation in the pdfjs library which is shipped with Foundry. There's nothing I can do in PDF Foundry to fix this issue.

Technical details (mostly for myself):
pdf.js creates a "select" element, but it should really create a "input text" element with an associated datalist to get this functionality working properly (in annotation_layer.js:ChoiceWidgetAnnotationElement.render)
The code does not test for hasFieldFlag(AnnotationFieldFlag.EDIT which would indicate that "custom text" can be entered.
Sample input+datalist example can be found at https://stackoverflow.com/questions/5650457/html-select-form-with-option-to-enter-custom-value

@farling42
Copy link
Owner

farling42 commented Dec 28, 2023

This is a known issue with pdf.js, it was originally raised 5 years ago: mozilla/pdf.js#10669

@farling42 farling42 added good first issue Good for newcomers deferred Awaiting bug fix in another project and removed good first issue Good for newcomers labels Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deferred Awaiting bug fix in another project pdfjs-bug
Projects
None yet
Development

No branches or pull requests

2 participants