microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
18.5k stars 2.73k forks source link

[Bug]: Keyboard navigation in Tree component with Drag and Drop is broken, after selecting a tree node with the enter key. #31012

Open artcab opened 6 months ago

artcab commented 6 months ago

Library

React Components / v9 (@fluentui/react-components)

System Info

System:
    OS: macOS 13.5.2
    CPU: (10) arm64 Apple M1 Max
    Memory: 10.05 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 123.0.6312.107
    Safari: 16.6

Are you reporting Accessibility issue?

None

Reproduction

https://react.fluentui.dev/?path=/docs/components-tree--default#drag-and-drop

Bug Description

Actual Behavior

In the Tree component, drag & drop example: select an element via keyboard navigation and press enter to select any tree node.

Expected Behavior

keyboard selection should not affect drag and drop, or if it is supposed to be possible, it must behave correctly.

Logs

No response

Requested priority

Normal

Products/sites affected

No response

Are you willing to submit a PR to fix?

yes

Validations

sopranopillow commented 6 months ago

Can confirm and it seems the drag and dropping is also not working correctly. Items get "stuck" halfway when drag and dropping with keyboard. This might be an issue for the DnD library rather than ours.

https://github.com/microsoft/fluentui/assets/5953191/c2756959-b4f7-4c6c-a478-7d0657c877d6