designsystemet icon indicating copy to clipboard operation
designsystemet copied to clipboard

Focus jumps to top when selecting values in MultiSuggestion

Open hansenalexander opened this issue 10 months ago • 3 comments

Version number

1.0.1

Description of the bug

When rapidly selecting values from the dropdown in the MultiSuggestion component, the focus jumps back to the top of the list. I haven't been able to reproduce the error in the demos.

Steps To Reproduce

Check out: https://codesandbox.io/p/sandbox/broken-cdn-y3ms3n

Additional Information

No response

hansenalexander avatar Mar 11 '25 18:03 hansenalexander

Initial finding: this is triggered in u-tags on this line because nextFocus is defined as input

oddvernes avatar Mar 31 '25 12:03 oddvernes

After speaking to the developer of u-tags, this is intended behaviour in order to get screenreaders across all platforms to properly announce that an item was selected. They have tried to work around it in many different ways but this is the current best solution, but more research can be done if it turns out to be too problematic for users 👍

oddvernes avatar Apr 03 '25 08:04 oddvernes

Were you going to have a look at this @eirikbacker ? :)

mimarz avatar Apr 22 '25 08:04 mimarz

Hi, is this still happening for you on v1.1.0?

Barsnes avatar Jun 24 '25 08:06 Barsnes

This was resolved when switching to u-combobox

oddvernes avatar Aug 19 '25 13:08 oddvernes