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

fix: DropZone button type #6237

Closed
wants to merge 1 commit into from

Conversation

adriantrunzo
Copy link

Closes #6230

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

fixes adobe#6230 - the focus trap button should be type button
so it does not accidentally submit forms.
@adriantrunzo
Copy link
Author

It seems like type="button" should be coming from the call to useButton, but I haven't tracked down why the type attribute doesn't come through in the button props.

@adriantrunzo
Copy link
Author

Also strange here is the type="button" does apply to the button in the test environment even without these changes.

@adriantrunzo adriantrunzo marked this pull request as draft April 19, 2024 18:38
@yihuiliao
Copy link
Member

yihuiliao commented Apr 19, 2024

Actually thanks to your comment about how type="button" was getting applied in the tests I dug around a bit more and found that this already has been fixed by #5958. Since this PR was made after the last release so you'll have to wait until our next release to get this update. We're hoping to get one out by the end of next week since it has been awhile but I can't guarantee anything. I think you can close out this PR but thank you for taking the time to work on it and submit it!

@adriantrunzo
Copy link
Author

Ah, thanks for the update. I realized soon after typing that comment about the tests that the issue had likely already been fixed. I wasn't sure where, though.

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.

DropZone unexpectedly submits forms.
2 participants