Skip to content

Commit ce98249

Browse files
committed
fix: prevent scroll behavior when focus trigger
close ant-design/ant-design#26582
1 parent cd3a8ec commit ce98249

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export default class Dialog extends React.Component<IDialogChildProps, any> {
161161
}
162162
if (mask && this.lastOutSideFocusNode && focusTriggerAfterClose) {
163163
try {
164-
this.lastOutSideFocusNode.focus();
164+
this.lastOutSideFocusNode.focus({ preventScroll: true });
165165
} catch (e) {
166166
this.lastOutSideFocusNode = null;
167167
}

0 commit comments

Comments
 (0)