mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-04 02:40:50 +08:00
merge old config
This commit is contained in:
@@ -73,8 +73,10 @@ export function Modal({ id, open, title, children, banner, busy, wide, role = "d
|
||||
};
|
||||
document.addEventListener("keydown", onKey);
|
||||
const focusFrame = requestAnimationFrame(() => {
|
||||
const target = initialFocus === "submit" ? submitButton.current : focusableElements(dialog.current!)[0];
|
||||
(target ?? dialog.current)?.focus();
|
||||
const currentDialog = dialog.current;
|
||||
if (!currentDialog) return;
|
||||
const target = initialFocus === "submit" ? submitButton.current : focusableElements(currentDialog)[0];
|
||||
(target ?? currentDialog).focus();
|
||||
});
|
||||
return () => {
|
||||
cancelAnimationFrame(focusFrame);
|
||||
|
||||
Reference in New Issue
Block a user