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: two key strokes required to change item in FluentSelect #1448

Closed
majkada opened this issue Feb 5, 2024 · 3 comments
Closed

fix: two key strokes required to change item in FluentSelect #1448

majkada opened this issue Feb 5, 2024 · 3 comments

Comments

@majkada
Copy link

majkada commented Feb 5, 2024

🐛 Bug Report

While using a FluentSelect with a keyboard 2 key strokes (either arrow up or arrow down) are required to actually change an item.

💻 Repro or Code Sample

E.g. it can be reproduced on https://www.fluentui-blazor.net/Forms with the "Primary Classification" select.

🤔 Expected Behavior

Only one key stroke is required to change an item.

😯 Current Behavior

Exactly two key strokes are required.

  • OS & Device: Windows on PC
  • Browser Google Chrome
  • FluentUI 4.4.0
@vnbaaij
Copy link
Collaborator

vnbaaij commented Feb 6, 2024

The strange thing is this only happens in WASM and it is not necessary for every item in a select. Even stranger is that if you add an fluent-select web component, it does work as expected. On Server it works with one keypress regardless.

I'll leave this open, but as the impact is really low and the component works as it should , we won't prioritize finding a solution for it.

@majkada
Copy link
Author

majkada commented Feb 6, 2024

I understand.

I looked into it a little and found the issue but I have no idea how to solve it properly.

This line of code executes "too fast"
https://github.com/microsoft/fluentui-blazor/blob/v4.4.0/src/Core/Components/List/ListComponentBase.razor.cs#L534

In WASM the "getAriaActiveDescendant" returns the old item on the first keystroke. You can see it work by just delaying the call even a single millisecond with:

await Task.Delay(TimeSpan.FromMilliseconds(1));

@vnbaaij
Copy link
Collaborator

vnbaaij commented Feb 6, 2024

Ok, Adding that delay for the next release 4.4.1.

vnbaaij added a commit that referenced this issue Feb 6, 2024
@vnbaaij vnbaaij closed this as completed in 2861d10 Feb 6, 2024
vnbaaij added a commit that referenced this issue Feb 6, 2024
* Fix #1450

* Fix #1448

* Fix demo notification center panel

* Revert editor.config changes

* Fix Tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants