Skip to content
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

Incorrect lockScroll behaviour on controlled modals #202

Closed
carton-of-mice opened this issue Sep 4, 2020 · 3 comments · Fixed by #203
Closed

Incorrect lockScroll behaviour on controlled modals #202

carton-of-mice opened this issue Sep 4, 2020 · 3 comments · Fixed by #203
Assignees

Comments

@carton-of-mice
Copy link

carton-of-mice commented Sep 4, 2020

In v2 lockScrolll() and resetScroll() are only called on uncontrolled behaviour for Popups.
The useEffect hook only toggles the open state.

Version

2.0.1

Test Case

https://codesandbox.io/s/reactjs-popup-issue-template-forked-jh2bd

Expected Behavior

overflow: hidden; set on body on open
overflow: auto; set on body on close

Actual Behavior

no style set on body on open
overflow: auto; set on body on close if closing by uncontrolled methods
no style set on body on close if setting open to false in a controlled manner (not shown in test)

@yjose
Copy link
Owner

yjose commented Sep 5, 2020

nice catch @csalgau , woking on a fix ....

@yjose yjose self-assigned this Sep 5, 2020
@yjose yjose mentioned this issue Sep 5, 2020
@yjose yjose closed this as completed in #203 Sep 5, 2020
@yjose yjose reopened this Sep 5, 2020
@yjose
Copy link
Owner

yjose commented Sep 5, 2020

the fix didn't work with the default open popup, will be fixed ASAP

@yjose yjose closed this as completed in ac7d835 Sep 5, 2020
@yjose
Copy link
Owner

yjose commented Sep 5, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants