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:
Brian Vaughn
2019-04-09 08:37:34 -07:00
parent 163bc234df
commit a29ab9ab79
+1 -1
View File
@@ -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;
}