Skip to content

Commit

Permalink
fix: prevent scroll behavior when focus trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Sep 4, 2020
1 parent f648087 commit 6756049
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "rc-dialog",
"version": "8.1.1",
"version": "8.1.2",
"description": "dialog ui component for react",
"keywords": [
"react",
Expand Down
2 changes: 1 addition & 1 deletion src/Dialog.tsx
Expand Up @@ -118,7 +118,7 @@ export default class Dialog extends React.Component<IDialogChildProps, any> {
this.inTransition = true;
if (mask && this.lastOutSideFocusNode && focusTriggerAfterClose) {
try {
this.lastOutSideFocusNode.focus();
this.lastOutSideFocusNode.focus({ preventScroll: true });
} catch (e) {
this.lastOutSideFocusNode = null;
}
Expand Down

0 comments on commit 6756049

Please sign in to comment.