mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Tree arrow navigation respects event.defaultPrevented
This prevents Reach MenuButton operations from also changing the tree selection in the background
This commit is contained in:
@@ -73,7 +73,7 @@ export default function Tree(props: Props) {
|
||||
}
|
||||
|
||||
const handleKeyDown = (event: KeyboardEvent) => {
|
||||
if ((event: any).target.tagName === 'INPUT') {
|
||||
if ((event: any).target.tagName === 'INPUT' || event.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user