fix stale selection after double-clicking folder in file browser

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 00:11:00 +00:00
co-authored by Claude Opus 4.6
parent 0a39c5043a
commit cce8738e89
@@ -506,6 +506,7 @@ export const FileItem = ({
return;
}
// Delay plain click so double-click doesn't trigger selection + layout shift
if (clickTimer.current) clearTimeout(clickTimer.current);
const syntheticEv = { ctrlKey: false, shiftKey: false, metaKey: false } as React.MouseEvent;
clickTimer.current = setTimeout(() => {
clickTimer.current = null;