fix(button): keep native submit button in the dom for implicit form submission#640
Open
samrichardsontylertech wants to merge 15 commits intomainfrom
Open
fix(button): keep native submit button in the dom for implicit form submission#640samrichardsontylertech wants to merge 15 commits intomainfrom
samrichardsontylertech wants to merge 15 commits intomainfrom
Conversation
…it form submission
|
|
DRiFTy17
previously approved these changes
Apr 4, 2025
Collaborator
DRiFTy17
left a comment
There was a problem hiding this comment.
These changes look good to me. While it does feel like a hacky workaround, the goal is to provide a seamless integration for devs to enable pressing the enter key while on a focused input within a <form>.
I just want to remind anyone that looks at this PR that the intention behind this change is to provide a stop-gap solution for handling form submission until the browser APIs allow for us to configure our buttons as "submit" buttons. When that is available, we will switch over and remove this temporary solution.
DRiFTy17
approved these changes
Apr 4, 2025
Ross-Blakeney
approved these changes
Apr 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
Describe the new behavior?
This adds a persistent slotted, hidden
<button type="submit"></button>to the base button component to enable implicit form submission, e.g. when a user presses the enter key while a form input is focused.