Skip to content

Commit

Permalink
fix(modals): pass relative doc to useFocusVisible
Browse files Browse the repository at this point in the history
  • Loading branch information
hzhu committed Sep 22, 2020
1 parent 7b776f8 commit c7ffc2c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions packages/modals/.size-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@
}
},
"index.cjs.js": {
"bundled": 42383,
"minified": 30557,
"gzipped": 6834
"bundled": 42418,
"minified": 30576,
"gzipped": 6840
},
"index.esm.js": {
"bundled": 39735,
"minified": 28236,
"gzipped": 6681,
"bundled": 39770,
"minified": 28255,
"gzipped": 6688,
"treeshaked": {
"rollup": {
"code": 22677,
"code": 22696,
"import_statements": 718
},
"webpack": {
"code": 25325
"code": 25344
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/modals/src/elements/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const Modal = React.forwardRef<HTMLDivElement, IModalProps>(
restoreFocus
});

useFocusVisible({ scope: modalRef });
useFocusVisible({ scope: modalRef, relativeDocument: environment });

useEffect(() => {
if (!environment) {
Expand Down

0 comments on commit c7ffc2c

Please sign in to comment.