fix: folder rows no longer nest action buttons inside a button

This commit is contained in:
LukeGus committed 2026-10-08 15:28:11 -05:00
1 parent ab2307bab4
commit 0324d27f13
2 files changed
+86 -2

No files matched your search

+13 -2
View File
@@ -168,7 +168,18 @@ export function FolderItem({
style={depth > 0 ? { paddingLeft: rem(depth * 12) } : undefined}
>
<div className="relative">
<button
{/* A div, not a button: the folder actions inside are buttons. */}
<div
role="button"
tabIndex={0}
aria-expanded={isOpen}
onKeyDown={(e) => {
if (e.target !== e.currentTarget) return;
if (e.key === "Enter" || e.key === " ") {
e.preventDefault();
if (!query) onToggleFolder(folderPath);
}
}}
draggable={canDragFolder}
onDragStart={(e) => {
if (!canDragFolder) return;
@@ -294,7 +305,7 @@ export function FolderItem({
)}
</>
}
</button>
</div>
</div>
{!flat && isOpen && (
<div className="border-l border-border/50 ml-[27px]">