react-resizable icon indicating copy to clipboard operation
react-resizable copied to clipboard

Drag handle can be made semi-non-functional on components with size constraints

Open xaroth8088 opened this issue 10 years ago • 1 comments

Environment: Chrome 47 on OS X, using a clean checkout & build of HEAD

Steps to reproduce:

  1. on examples/1.html, find the "Resizable box, starting at 200x200. Min size is 150x150, max is 500x300." box
  2. On that box, drag the resize handle up and left until the box no longer shrinks, continuing to drag to about the middle of the box
  3. Repeat step 2 several times
  4. Now, try to drag the resize handle down and right

Expected results: Box should grow normally

Actual results: Box does not resize

Workaround: If you keep repeating step 4 until you've moved roughly the same cumulative distance that you did in step 3, it'll eventually start to work normally again.

Hypothesis: There's some state internal to Resizable or its Draggable handle that doesn't properly respect state.bounds. However, the source of the bug wasn't obvious within an hour's debugging.

xaroth8088 avatar Dec 24 '15 18:12 xaroth8088

I am experiencing a similar problem. However for me it happens even if I hold down the mouse at the handle and attempt grow my resizable box outside of it's maxConstraints. The next time I try to resize there seems to be a gap of mouse movement which will not trigger any resizing. Only after dragging a distance that seems to be equal to the distance I traveled with my cursor out of the maxConstraints does the box start to shrink again.

vullnetyy avatar May 31 '16 17:05 vullnetyy