Wrap modal in focus lock provider
This commit is contained in:
parent
009a586dc7
commit
838e7dcecd
|
@ -85,13 +85,6 @@
|
|||
max-height: 100%;
|
||||
}
|
||||
|
||||
.bd-modal-root > div[role="dialog"] {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.bd-close-button {
|
||||
height: 26px;
|
||||
padding: 4px;
|
||||
|
|
|
@ -34,14 +34,14 @@ export default function ModalRoot({className, transitionState, children, size =
|
|||
}
|
||||
});
|
||||
|
||||
return <Spring.animated.div
|
||||
return <FocusLock disableTrack={true}>
|
||||
<Spring.animated.div
|
||||
className={Utilities.className("bd-modal-root", size, className, style)}
|
||||
style={springStyles}
|
||||
>
|
||||
<FocusLock disableTrack={true}>
|
||||
{children}
|
||||
</FocusLock>
|
||||
</Spring.animated.div>;
|
||||
</Spring.animated.div>
|
||||
</FocusLock>;
|
||||
// const [visible, setVisible] = React.useState(true);
|
||||
|
||||
// const visible = transitionState < 2;
|
||||
|
|
Loading…
Reference in New Issue