Bounds checking bugs
See original GitHub issueOverview of the problem
I’m finding several bugs related to bounds checking.
-
When
bounds="window", attempts to drag the Rnd cause it to move to top left of window. You can resize it without it moving, but when you then try to drag, it moves. See it here: https://www.webpackbin.com/bins/-L-ZFjL6mq72pTvbHIHU -
When
lockAspectRatiois set andbounds="parent", it is possible to resize the Rnd outside of the lower bounds. First move the Rnd to the bottom of the window, then resize it from the left or right edge. The bottom will grow past the bottom edge of the window. Additional resizes from other edges/corners keep the Rnd in the same position. But clicking it to drag causes it move so the entire Rnd is within the bounds. See it here: https://www.webpackbin.com/bins/-L-ZHTV_IdyFrlUr-jip -
My understanding is the
boundcan take a selector. Howeverbounds="body"doesn’t seem to work as expected.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:13 (8 by maintainers)

Top Related StackOverflow Question
Seems to work for me @bokuweb
Thanks!!
@tauren @romanlex @davitv @tnrich Hi, this issue solved by v8.0.2. would you please try the latest version?
windowboundsbodyboundslockAspectRatioset.I’ll do programable bounds impletion in the future. https://github.com/bokuweb/react-rnd/issues/388
I close this issue, for now. If you find new problem, please reopen this issue or create new one.