fix(dialog): remove onOpenAutoFocus, keep only onCloseAutoFocus

Remove onOpenAutoFocus handler that was causing scroll issues on first open.
Keep onCloseAutoFocus to prevent scroll to trigger element on close.

Key fix: Move {...props} before onCloseAutoFocus to prevent override.
This commit is contained in:
sagitchu
2026-03-14 10:12:21 +08:00
parent 149e10ee66
commit 42a775c3bb
2 changed files with 0 additions and 6 deletions
@@ -62,9 +62,6 @@ function DialogContent({
className, className,
)} )}
data-slot="dialog-content" data-slot="dialog-content"
onOpenAutoFocus={(e) => {
e.preventDefault();
}}
onCloseAutoFocus={(e) => { onCloseAutoFocus={(e) => {
e.preventDefault(); e.preventDefault();
}} }}
@@ -158,9 +158,6 @@ export function ModalContent({
className, className,
)} )}
showCloseButton={false} showCloseButton={false}
onOpenAutoFocus={(e) => {
e.preventDefault();
}}
onCloseAutoFocus={(e) => { onCloseAutoFocus={(e) => {
e.preventDefault(); e.preventDefault();
}} }}