-
Notifications
You must be signed in to change notification settings - Fork 904
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
md-button doesn't integrate with form data #4526
Comments
It looks like there is a button inside of the custom element but it gets none of the attributes (name/value/type). Not sure if that would be the simplest fix or if there are downside to that approach. |
I just noted this yesterday while doing a review of button :) |
copybara-service bot
pushed a commit
that referenced
this issue
Aug 17, 2023
Fixes #4526 PiperOrigin-RevId: 557962836
copybara-service bot
pushed a commit
that referenced
this issue
Aug 18, 2023
Fixes #4526 PiperOrigin-RevId: 557962836
copybara-service bot
pushed a commit
that referenced
this issue
Aug 18, 2023
Fixes #4526 PiperOrigin-RevId: 557962836
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was adding an
md-button
to an existing form and thought it would act "just like a button with different styles". But it looks like thetype=submit
just emulates the behavior on a non-button element. But at least one behavior is missing from that emulation: A named submit button should show up in the form data. Example:When submitting, I would expect
btn=a
orbtn=b
to appear in the form data, depending on which button was clicked to submit. If the form is submitted by pressing<enter>
while focussing the text input field, I would expect the first submit button's value to appear in the form data.Example (hopefully stays online): https://jsfiddle.net/au82xrv9/1/
The text was updated successfully, but these errors were encountered: