-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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: Do not use default button type. #5512
fix: Do not use default button type. #5512
Conversation
The default button type is "submit" which triggers a form submit. Thus if videojs is embedded in a form element the button triggers a form submit. This is the same problem with same solution as discussed in #2470
💖 Thanks for opening this pull request! 💖 Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch, thank you!
I searched the source and didn't find any other cases where we'd create a button element that did not have this attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. Thanks!
Yeah, our Button component has that by default which is nice Lines 43 to 44 in 313036e
|
Congrats on merging your first pull request! 🎉🎉🎉 |
The default button type is "submit" which triggers a form submit. Thus if videojs is embedded in a form element the button triggers a form submit. This is the same problem with same solution as discussed in #2470
The default button type is "submit" which triggers a form submit. Thus
if videojs is embedded in a form element the button triggers a form
submit.
This is the same problem with same solution as discussed in #2470