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

fix: unscrollable style remains when modal is unmounted #4525

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

louiseliang
Copy link
Contributor

@louiseliang louiseliang commented Feb 21, 2024

Important: Request PR reviews on Slack

Please reach out to the design system team on Slack in #prod_design_system for PR reviews. GitHub notifications (e.g. from tagging a person) are not actively monitored.

Why

There is a bug when modal is unmounted (e.g. navigation, parent unmounted) after onConfirm, the unscrollable style remains which stops user from scrolling unless refresh.

What

Include the clean up code in onAfterLeave to a useEffect's return block.

Before

Screen.Recording.2024-02-21.at.15.03.19.mov

After

Screen.Recording.2024-02-21.at.14.57.38.mov

@louiseliang louiseliang requested a review from a team as a code owner February 21, 2024 04:06
Copy link

changeset-bot bot commented Feb 21, 2024

🦋 Changeset detected

Latest commit: 927054b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@kaizen/components Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Feb 21, 2024

✨ Here is your branch preview! ✨

Last updated for commit 927054b: Reword changeset

@dougmacknz dougmacknz merged commit 9c586b4 into main Feb 21, 2024
17 checks passed
@dougmacknz dougmacknz deleted the ll/fix-unscrollable-after-modal-close branch February 21, 2024 04:43
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 this pull request may close these issues.

2 participants