Skip to content

Commit a3d948a

Browse files
wchrapkadroshev
andauthored
fix: restore scroll position after fialog closes (#1397)
Co-authored-by: deno <[email protected]>
1 parent 4a134cb commit a3d948a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ storybook-static
2727
npm-debug.log*
2828
yarn-debug.log*
2929
yarn-error.log*
30+
31+
.idea

src/Dialog/Dialog.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ class Dialog extends Component {
105105
return ReactDOM.createPortal(
106106
<FocusLock as='div' className={backdropClassName}
107107
lockProps={{ ...rest }}
108+
returnFocus
108109
whiteList={allowListForLockFocus}>
109110
<span data-autofocus tabIndex='-1' />
110111
<div

0 commit comments

Comments
 (0)