Skip to content

fix: file upload on input elements with display:none style #154

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

maurb
Copy link

@maurb maurb commented Jul 10, 2025

This PR updates the UploadFileTool to support uploading files to elements that are hidden with style="display:none".
The tool now:

  • Detects if the file input is hidden and temporarily makes it visible before uploading.
  • Uses a custom attribute to track if the tool changed the visibility, and restores the original hidden state after the upload.
  • Maintains existing behaviour for visible file inputs.

With this change, automated file uploads now work for both visible and hidden file input elements, improving compatibility with modern web apps and frameworks that use custom file upload UIs.

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

Successfully merging this pull request may close these issues.

1 participant