Skip to content

Commit a2ab585

Browse files
committed
chore: update
1 parent da7a732 commit a2ab585

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Dialog/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ export default function Dialog(props: IDialogPropTypes) {
6060
}
6161

6262
function focusDialogContent() {
63-
if (originFocusEl) return originFocusEl.focus();
64-
if (contains(wrapperRef.current, document.activeElement)) {
63+
if (originFocusEl) {
64+
originFocusEl.focus();
65+
} else if (contains(wrapperRef.current, document.activeElement)) {
6566
setOriginFocusEl(document.activeElement as HTMLElement);
6667
} else {
6768
contentRef.current?.focus();

0 commit comments

Comments
 (0)