We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da7a732 commit a2ab585Copy full SHA for a2ab585
src/Dialog/index.tsx
@@ -60,8 +60,9 @@ export default function Dialog(props: IDialogPropTypes) {
60
}
61
62
function focusDialogContent() {
63
- if (originFocusEl) return originFocusEl.focus();
64
- if (contains(wrapperRef.current, document.activeElement)) {
+ if (originFocusEl) {
+ originFocusEl.focus();
65
+ } else if (contains(wrapperRef.current, document.activeElement)) {
66
setOriginFocusEl(document.activeElement as HTMLElement);
67
} else {
68
contentRef.current?.focus();
0 commit comments