mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-04 23:24:21 +00:00
fix(webui): stabilize transcript menu interactions
This commit is contained in:
@@ -96,6 +96,17 @@ export function GenerateTranscriptsDialog({
|
||||
|
||||
<Combobox
|
||||
items={choices}
|
||||
onOpenChange={(isOpen, details) => {
|
||||
const activeElement = dialogRef.current?.ownerDocument.activeElement
|
||||
// WebKit can report focus-out after focus has already returned to the input.
|
||||
if (
|
||||
!isOpen &&
|
||||
details.reason === 'focus-out' &&
|
||||
activeElement === details.event.target
|
||||
) {
|
||||
details.cancel()
|
||||
}
|
||||
}}
|
||||
value={choices.find((choice) => choice.code === language)}
|
||||
onValueChange={(choice) => setLanguage(choice?.code ?? '')}
|
||||
itemToStringLabel={(choice) => choice.name}
|
||||
|
||||
Reference in New Issue
Block a user