Modal: Fix unexpectedly freezing menus
This commit is contained in:
parent
86e4bd1f3c
commit
26d6505123
@ -74,7 +74,8 @@ const Modal: FC<OwnProps & StateProps> = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
useEffectWithPrevDeps(([prevIsOpen]) => {
|
useEffectWithPrevDeps(([prevIsOpen]) => {
|
||||||
document.body.classList.toggle('has-open-dialog', isOpen);
|
document.body.classList.toggle('has-open-dialog', Boolean(isOpen));
|
||||||
|
|
||||||
if (isOpen || (!isOpen && prevIsOpen !== undefined)) {
|
if (isOpen || (!isOpen && prevIsOpen !== undefined)) {
|
||||||
dispatchHeavyAnimationEvent(ANIMATION_DURATION);
|
dispatchHeavyAnimationEvent(ANIMATION_DURATION);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user