pradel / react-responsive-modal

Simple responsive react modal
https://react-responsive-modal.leopradel.com/
MIT License
604 stars 95 forks source link

Fix scroll lock issue for iOS #477

Closed pc035860 closed 3 years ago

pc035860 commented 3 years ago

Sorry for the late PR.

As I mentioned in #462, I end up using a new ref for modal container for body-scroll-lock to address the issue. And I'm already using this build in production e-commerce site.

Related issues: #462, #468

pc035860 commented 3 years ago

BTW, the scroll lock issue sometimes actually caused by #470, since the "close modal" behavior doesn't triggered properly by the animation end event.

So to test if the scroll lock issue is fixed, make sure animationDuration or applied animation-duration style is greater than zero.

codecov[bot] commented 3 years ago

Codecov Report

Merging #477 (b416559) into master (23cccc6) will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #477      +/-   ##
==========================================
+ Coverage   97.20%   97.22%   +0.01%     
==========================================
  Files           6        6              
  Lines         179      180       +1     
  Branches       66       65       -1     
==========================================
+ Hits          174      175       +1     
  Misses          5        5              
Impacted Files Coverage Δ
react-responsive-modal/src/index.tsx 100.00% <100.00%> (ø)

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 23cccc6...b416559. Read the comment docs.