nkbt / react-collapse

Component-wrapper for collapse animation with react-motion for elements with variable (and dynamic) height
MIT License
1.13k stars 113 forks source link

Fixes #186 - Browser zoom can cause expansion to remain incomplete, and break nested content expansion #235

Closed eddierl closed 5 years ago

eddierl commented 6 years ago

Added check for RESTING or WAITING state when there is a 1px difference in measured content and wrapper. Only proceed with resizing of not in this state, caused by subpixel rounding difference in clientHeights, encountered at non-standard zoom levels. Otherwise will never reach IDLING state, and cause nested content to clip should it in turn expand or collapse

This PR is a duplication of #187 except it base is 4.x (while the original base is master which now belongs to version 5) and I forked it on my account using @alechill commit

nkbt commented 5 years ago

No longer relevant after v5 release https://github.com/nkbt/react-collapse/releases/tag/v5.0.0