Skip to content

fix(web-components): prevent text-input from submitting twice when Enter is pressed#36240

Open
marchbox wants to merge 3 commits into
microsoft:masterfrom
marchbox:users/machi/fix-text-input-submit
Open

fix(web-components): prevent text-input from submitting twice when Enter is pressed#36240
marchbox wants to merge 3 commits into
microsoft:masterfrom
marchbox:users/machi/fix-text-input-submit

Conversation

@marchbox
Copy link
Copy Markdown
Contributor

Previous Behavior

When the pressing Enter key to submit pattern is triggered in <fluent-text-input>, the form is submitted twice. Because both beforeinput and keydown event handlers would request form submission.

New Behavior

beforeinput event handler removed, form now only submit once.

Related Issue(s)

Fixes #35802

@github-actions
Copy link
Copy Markdown

📊 Bundle size report

✅ No changes found

@github-actions
Copy link
Copy Markdown

Pull request demo site: URL

@@ -0,0 +1,7 @@
{
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-web-components/MenuList 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/MenuList. - RTL.2nd selected.chromium.png 17 Changed
vr-tests-web-components/RadioGroup 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/RadioGroup. - Dark Mode.2nd selected.chromium_3.png 119 Changed
vr-tests-web-components/TextInput 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/TextInput. - Dark Mode.normal.chromium_1.png 288 Changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[Bug]: double submit with enter

2 participants