ui icon indicating copy to clipboard operation
ui copied to clipboard

Command component bug with keyboard navigation ⌨️ 🐞

Open harveyhq opened this issue 1 year ago • 10 comments

On https://ui.shadcn.com/themes, after opening the command bar and repeatedly hitting the down arrow ⬇️, navigation through command items glitches. chrome_53WgYTUCE8

harveyhq avatar Dec 14 '23 22:12 harveyhq

@harveyhq perfect working not get issue Screencast from 15-12-23 01:35:56 PM IST.webm

Dhruvn-patel avatar Dec 15 '23 08:12 Dhruvn-patel

@Dhruvn-patel But as I see you just opened Command menu, after opening it please try pressing only the down arrow key a few times to navigate through the items, on my vid you can see that the navigation doesn't work as expected. I tried on Windows 11, latest versions of Chrome and Firefox, the result is the same.

harveyhq avatar Dec 15 '23 09:12 harveyhq

Yes, it advances one item and then starts over. If you have 10 items you have to tab through 10 times almost like it discovers a new item each time and adds it to a tab list and then starts over from the first tab.

The input and select components work the same way.

Any idea how to fix keyboard interaction with arrow or tab buttons?

Jamison1 avatar Jan 09 '24 17:01 Jamison1

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

shadcn avatar Feb 28 '24 23:02 shadcn

I'm seeing this issue with my whole form. It almost seems like something is forcing the whole form to re-render, but all I'm doing is tabbing through the form fields. @Jamison1 did you find a workaround for this?

nstolmaker avatar Apr 22 '24 23:04 nstolmaker

@shadcn this is still happening on the themes page and when using the command component, especially when rendering async search results

makrandgupta avatar May 15 '24 17:05 makrandgupta

@shadcn I'm seeing the same issue.

dlicheva avatar Aug 05 '24 10:08 dlicheva

@makrandgupta @dlicheva re-opening. I'll take a look.

shadcn avatar Aug 05 '24 10:08 shadcn

The issue for me is only happening when the CommandItem contains an Avatar with an AvatarFallback. It's resolved if I remove the AvatarFallback and set the Avatar's tabIndex to -1

dlicheva avatar Aug 05 '24 10:08 dlicheva

https://www.instagram.com/1900_officelle?igsh=MW5ueDI0b21qbW44Zg==

Diana @.***> schrieb am Mo., 5. Aug. 2024, 12:55:

The issue for me is only happening when the CommandItem contains an Avatar with an AvatarFallback. It's resolved if I remove the AvatarFallback.

— Reply to this email directly, view it on GitHub https://github.com/shadcn-ui/ui/issues/2116#issuecomment-2268786014, or unsubscribe https://github.com/notifications/unsubscribe-auth/BIO77CM6WUBLWCWGYGV77QTZP5K25AVCNFSM6AAAAABAVRC7XCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRYG44DMMBRGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

nullnullsieben avatar Aug 05 '24 11:08 nullnullsieben