Dragging to edge increases bounding container size when overflow: auto
Overview of the problem
When using RND in a container with the css attribute overflow: auto, dragging to the right and bottom edge will cause some browsers to increase the size of the container and scroll bars will show. The RND box is kept within the original bounds though.
I'm using react-rnd version [10.1.10]
My browser is:
Chrome, Edge Chromium, Firefox
Does not happen on safari
Reproduced project
https://codesandbox.io/s/jolly-montalcini-p485m
Expected behavior
The container does not increase in size and no scroll bars are shown
Actual behavior
The container size is increased and scroll bars are shown
I changed it to overflow: 'hidden and think it solves your issue
https://codesandbox.io/s/busy-cdn-bv0hw?file=/src/styles.css
Changing overflow to hidden is problematic for cases where the container is outside of the viewport. For example when resizing the window or persisting the location of the container. With overflow hidden you would not be able to find the container then