react-draggable
react-draggable copied to clipboard
Bounds change
trafficstars
The react-draggable component has two issues when the "bounds" prop is used:
- If the boundaries are changed in props on re-rendering, the new boundaries are not taken into account.
- If the bounds are set to another HTML element, the resizing of the respective element is not taken into account. The most prominent example for this is that if a draggable bounds is set to html/body, resizing of the browser window makes the draggable sticking out.
There are no appropriate workarounds to these issues.
travisoneill and wootencl submitted fixes for these. We, a small team of software professionals, merged these fixes with the current master, corrected the linter errors (that came due to a @flow issue), and propose these changes to be submitted.
I have a similar issue. Bounds are not respected if window is resized and there doesn't seem to be any way to force a bounds check without the user initiating a drag.