Skip to content
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: Hitting enter doesn't submit in FluentCombobox #2726

Open
JamesNK opened this issue Sep 27, 2024 · 2 comments
Open

fix: Hitting enter doesn't submit in FluentCombobox #2726

JamesNK opened this issue Sep 27, 2024 · 2 comments
Assignees
Labels
area:fluent-ui-web-components A FluentUI specific issue status:blocked Any issue blocked by another v5 For the next major version

Comments

@JamesNK
Copy link
Member

JamesNK commented Sep 27, 2024

🐛 Bug Report

Hitting enter key when focus is inside a FluentCombobox doesn't submit the form.

💻 Repro or Code Sample

🤔 Expected Behavior

I would expect that hitting enter would close the combobox if it is open (and change the value if an option is selected on enter).
I would then expect that hitting enter again (while combobox is closed) would submit the form.

😯 Current Behavior

Nothing happens.

💁 Possible Solution

🔦 Context

🌍 Your Environment

  • OS & Device: [e.g. MacOS, iOS, Windows, Linux] on [iPhone 7, PC]
  • Browser [e.g. Microsoft Edge, Google Chrome, Apple Safari, Mozilla FireFox]
  • .NET and Fluent UI Blazor library Version [e.g. 8.0.2 and 4.4.1]
@microsoft-github-policy-service microsoft-github-policy-service bot added the triage New issue. Needs to be looked at label Sep 27, 2024
@vnbaaij
Copy link
Collaborator

vnbaaij commented Sep 28, 2024

There are some known issues with input (TextField, TextArea, etc) web components and enter key behavior. See also #1050 and #1085. As the Combobox uses a Fluent text field internally, I can imagine that this component is affected as well.

I'll do some more investigating.

@vnbaaij vnbaaij added area:fluent-ui-web-components A FluentUI specific issue status:needs-investigation Needs additional investigation and removed triage New issue. Needs to be looked at labels Sep 28, 2024
@vnbaaij vnbaaij self-assigned this Sep 28, 2024
@vnbaaij
Copy link
Collaborator

vnbaaij commented Oct 7, 2024

This behavior is referred to as implicit form submission: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#implicit-submission

The good news is this is built into the <fluent-text-input> v3 component. And the team said they will make sure to do the same for combobox.
The bad news is it won't get fixed here...

@vnbaaij vnbaaij added status:blocked Any issue blocked by another v5 For the next major version and removed status:needs-investigation Needs additional investigation labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:fluent-ui-web-components A FluentUI specific issue status:blocked Any issue blocked by another v5 For the next major version
Projects
None yet
Development

No branches or pull requests

2 participants