MudAutocomplete: Fix input not focused on adornment click#11970
MudAutocomplete: Fix input not focused on adornment click#11970danielchalmers merged 5 commits intoMudBlazor:devfrom
Conversation
Added await FocusAsync(); after menu is opened from non-delegate AdornmentClick
There was a problem hiding this comment.
Code Review
The pull request addresses an issue where the input field in the MudAutocomplete component was not automatically focused when clicking on the adornment. The fix adds await FocusAsync() after the menu is opened from a non-delegate AdornmentClick, improving the user experience by allowing users to immediately start typing after clicking the adornment. I have added a review comment to address a potential issue.
There was a problem hiding this comment.
Pull Request Overview
Fixes the issue where clicking the adornment on MudAutocomplete did not focus the input, preventing immediate typing.
- Add FocusAsync after toggling the menu from an adornment click without a delegate.
- Ensures keyboard input is accepted after clicking the adornment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Only trigger on open Co-authored-by: Copilot <[email protected]>
|
Ready :) |
Added a test to ensure the input field is focused when the adornment icon is clicked.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
When clicking on the adornment users could not start typing to search/filter results unless they clicked on the input directly. Added await FocusAsync(); after menu is opened from non-delegate AdornmentClick.
In the demos below after I click the input or adornment I am typing "test" on the keyboard. Before the fix the adornment does not allow me to type.

Before:
After:
