-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fix button type getter steps #11047
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 button type getter steps #11047
Conversation
Buttons in the Auto state that are submit buttons now reflect to submit correctly
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.
I think it would be clearer to return "submit" if it's a submit button first. Then "button" if it's in the Auto state. And then the value corresponding to state. Possibly with an assert that state cannot be the Submit Button state in there.
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.
I also moved the Assert up. Looks good to me now. Can you confirm it still looks good to you @lukewarlow?
I think we maybe both reordered it and it got confused it seems to be below the state var still but looks good to me |
Well it should be below the state variable initialization, because it uses that. But it doesn't have to be below the Auto state check. |
Ah apologies I was confusing the assert and the submit button check. |
Corresponds to part of whatwg/html#9841 and then whatwg/html#11047 Adding `Auto` as a type state feels a little odd, as it's not an actual type allowed in HTML. However, it's the default state when the value is missing or invalid, which works out the same, as long as we never serialize "auto", which we don't.
Corresponds to part of whatwg/html#9841 and then whatwg/html#11047 Adding `Auto` as a type state feels a little odd, as it's not an actual type allowed in HTML. However, it's the default state when the value is missing or invalid, which works out the same, as long as we never serialize "auto", which we don't.
Corresponds to part of whatwg/html#9841 and then whatwg/html#11047 Adding `Auto` as a type state feels a little odd, as it's not an actual type allowed in HTML. However, it's the default state when the value is missing or invalid, which works out the same, as long as we never serialize "auto", which we don't.
Corresponds to part of whatwg/html#9841 and then whatwg/html#11047 Adding `Auto` as a type state feels a little odd, as it's not an actual type allowed in HTML. However, it's the default state when the value is missing or invalid, which works out the same, as long as we never serialize "auto", which we don't.
Fix button type getter steps
Buttons in the Auto state that are submit buttons now reflect to submit correctly
Fixes #11046
(See WHATWG Working Mode: Changes for more details.)
/form-elements.html ( diff )