fix(ui): add modal={false} to file browser menus to prevent focus-conflict freeze

This commit is contained in:
yiling
2026-05-24 10:02:08 +08:00
parent 5a36bf308f
commit 1b04366724
3 changed files with 4 additions and 5 deletions
@@ -533,7 +533,7 @@ export function FileBrowser({
const renderContent = () => {
return (
<ContextMenu>
<ContextMenu modal={false}>
<ContextMenuTrigger asChild disabled={isShareView || isPublic}>
<div
ref={scrollContainerRef}
+2 -3
View File
@@ -266,9 +266,8 @@ export function FileCard({
{displayItem.creator?.name}
</p>
</div>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild> <Button
size="icon-sm"
variant="ghost"
className="cursor-pointer"
@@ -276,7 +276,7 @@ export function FolderCard({
<span className="text-xs tracking-wide opacity-80">
{item.fileCount || 0} {(item.fileCount || 0) === 1 ? 'Item' : 'Items'}
</span>
<DropdownMenu>
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
<button
onClick={(e) => e.stopPropagation()}