diff --git a/components/ImportTranscriptOption.tsx b/components/ImportTranscriptOption.tsx index b403360..109daca 100644 --- a/components/ImportTranscriptOption.tsx +++ b/components/ImportTranscriptOption.tsx @@ -176,11 +176,14 @@ export default function ImportTranscriptOption() { } // Do not set source to "import" until a file is chosen. Close the menu // before the OS dialog so cancel cannot leave it pinned open. + // Open the picker in this same user-gesture turn — deferring to rAF + // drops Chrome's user activation and the dialog never appears. pickGenRef.current += 1; setPicking(true); setError(null); + const input = fileRef.current; ctx.closeMenu(); - requestAnimationFrame(() => fileRef.current?.click()); + input?.click(); }} > onOpenChange(false)} + zClassName={backdropZClassName} + /> + ) : null; + return ( - {backdrop && open && ( - onOpenChange(false)} - zClassName={backdropZClassName} - /> - )} + {backdropNode && + (portal ? {backdropNode} : backdropNode)} {children} ); diff --git a/components/SettingsMenu.tsx b/components/SettingsMenu.tsx index 9b7d5cb..4a72685 100644 --- a/components/SettingsMenu.tsx +++ b/components/SettingsMenu.tsx @@ -96,6 +96,10 @@ export default function SettingsMenu() { href={href} target="_blank" rel="noopener noreferrer" + // Keep the click on the anchor — popover dismiss listeners must + // not treat this as an outside press or swallow navigation. + onPointerDown={(e) => e.stopPropagation()} + onClick={() => setOpen(false)} className="flex items-center gap-2.5 px-3 py-2 text-[13px] text-zinc-700 transition hover:bg-zinc-50 dark:text-zinc-300 dark:hover:bg-zinc-800/80" > diff --git a/components/TranscriptPanel.tsx b/components/TranscriptPanel.tsx index 003b2a1..dad4dc3 100644 --- a/components/TranscriptPanel.tsx +++ b/components/TranscriptPanel.tsx @@ -334,25 +334,25 @@ export default function TranscriptPanel() { )} {(status === "ready" || status === "error" || status === "transcribing") && ( <> - - { - const files = e.target.files; - e.target.value = ""; - void handleImportTranscript(files); - }} - /> + { + const files = e.target.files; + e.target.value = ""; + void handleImportTranscript(files); + }} + /> + )}