-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enableBodyScroll doesn't enable scroll #90
Comments
@willmcpo anything I can do to help get the PR merged? You can replicate the issue by clicking twice |
The same with me. I have modal inside modal. And this line evaluated too false because locks length is > 1. |
@SeanSilke if you close one modal and still have one open, the body should still be locked, right? |
@diachedelic Yes. My problem is with unlocking body scroll. |
i started reviewing this one |
Why would you ever call disableScroll on the same target element? |
I have similar problem but when the targetElement doesn't exist anymore, eg. it unmounted or something the body's overflow would never be removed. |
Can you describe more of your use case?
…On Mon, Jun 17, 2019, 6:02 AM Kossel ***@***.***> wrote:
I have similar problem but when the targetElement doesn't exist anymore,
eg. it unmounted or something the body's overflow would never be removed.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#90?email_source=notifications&email_token=ADJPCOSNSWSXVSQZLW357DLP22L4NA5CNFSM4GSWKLE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXZUD2I#issuecomment-502481385>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADJPCOWOMO7UVFLXD52ZBPLP22L4NANCNFSM4GSWKLEQ>
.
|
yes, please see this codesandbox I created to reproduce it. it's a very very slim down version of what I'm doing, basically for modal, we offer the option of "unmount/destroy content when close" so when the |
@willmcpo wrote |
Sure. The pull request to fix this needs to make an amendment then we can merge. |
#90 fix not worked enableBodyScroll in some conditions
Merged fix |
enableBodyScroll
doesn't enable scroll in situationdisableBodyScroll
was required (n+1)-times andenableBodyScroll
n-times.enableBodyScroll
anddisableBodyScroll
was required without arguments.To reproduce the issue try the next sequence of function requiring:
disableBodyScroll()
disableBodyScroll()
enableBodyScroll()
as result
overflow: hidden
styles in<body>
still persist.I already have prepared commit to fix this issue
The text was updated successfully, but these errors were encountered: