Skip to content

Commit

Permalink
fix: restore scroll position after fialog closes (#1397)
Browse files Browse the repository at this point in the history
Co-authored-by: deno <mladen.droshev@sap.com>
  • Loading branch information
wchrapka and droshev committed Feb 12, 2022
1 parent 4a134cb commit a3d948a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ storybook-static
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.idea
1 change: 1 addition & 0 deletions src/Dialog/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class Dialog extends Component {
return ReactDOM.createPortal(
<FocusLock as='div' className={backdropClassName}
lockProps={{ ...rest }}
returnFocus
whiteList={allowListForLockFocus}>
<span data-autofocus tabIndex='-1' />
<div
Expand Down

0 comments on commit a3d948a

Please sign in to comment.