mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-11 11:46:37 +08:00
fix(dialog): prevent both open and close auto focus to avoid page scroll (#317)
Add onOpenAutoFocus handler to prevent Radix Dialog from auto-focusing content on open, which can cause unwanted scroll behavior.
This commit is contained in:
@@ -158,6 +158,9 @@ export function ModalContent({
|
||||
className,
|
||||
)}
|
||||
showCloseButton={false}
|
||||
onOpenAutoFocus={(e) => {
|
||||
e.preventDefault();
|
||||
}}
|
||||
onCloseAutoFocus={(e) => {
|
||||
e.preventDefault();
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user