Skip to content

Commit c0536df

Browse files
committed
fix: resolve click and keyboard navigation in file tree by checking isSelected instead of isActive
1 parent a3b2299 commit c0536df

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

anycode/components/TreeNodeComponent.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const TreeNodeComponentImpl: React.FC<TreeNodeComponentProps> = ({
5959

6060
const handleNameClick = (e: React.MouseEvent) => {
6161
e.stopPropagation();
62-
if (isActive) return;
62+
if (isSelected) return;
6363
onActivate(node.id);
6464

6565
if (node.type === 'file') {
@@ -81,7 +81,6 @@ const TreeNodeComponentImpl: React.FC<TreeNodeComponentProps> = ({
8181
if (e.button !== 0) {
8282
return;
8383
}
84-
if (isActive) return;
8584
onActivate(node.id);
8685
};
8786

0 commit comments

Comments
 (0)