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(Modal): add/remove dimmer classes in raf #2010

Merged
merged 3 commits into from
Sep 30, 2017

Conversation

levithomason
Copy link
Member

@levithomason levithomason commented Aug 28, 2017

Fixes #1157

The dimmer classes added to and removed from the body currently only happen on mount and unmount. However, with multiple modals, the outer most Modal's unmount will remove the classes and the Modal beneath it will appear broken.

This PR moves the dimmer body class handling to the animation frame, beside the scrolling class handling. This way, the dimmer classes are continually updated.

@nemo
Copy link

nemo commented Sep 29, 2017

Super excited for this PR to be merged so I can remove all the fixBody functions I've put everywhere 💯

@codecov-io
Copy link

codecov-io commented Sep 30, 2017

Codecov Report

Merging #2010 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2010      +/-   ##
==========================================
- Coverage   99.76%   99.76%   -0.01%     
==========================================
  Files         151      151              
  Lines        2605     2602       -3     
==========================================
- Hits         2599     2596       -3     
  Misses          6        6
Impacted Files Coverage Δ
src/modules/Modal/Modal.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a37f28...296d8b6. Read the comment docs.

@levithomason
Copy link
Member Author

I've fixed tests/lint and rebased to master. We're good to go here once tests pass.

@levithomason levithomason merged commit 9c97ed9 into master Sep 30, 2017
@levithomason levithomason deleted the fix/modal-dimmer-classes branch September 30, 2017 21:44
@levithomason
Copy link
Member Author

Released in [email protected]

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

Successfully merging this pull request may close these issues.

3 participants