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

setting position to NaN crashes RnD component

Open oliv9286 opened this issue 5 years ago • 0 comments

Overview of the problem

I'm using react-rnd version [10.1.0]

My browser is: Chrome 77.0

I am sure this issue is not a duplicate?

Reproduced project

https://codesandbox.io/s/busy-ganguly-fjnkv

Description

Steps to Reproduce

  1. use the "Set NaN" button to set RnD position (either x or y) to NaN
  2. Try dragging the RnD div, it will not move because position is not a valid number
  3. Click the "Set 10" button, this resets the position to 10, a valid number
  4. Rnd div still not draggable, and position is not updated

Expected behavior

Rnd div's position should be updated once it gets set back to a valid number

Actual behavior

Rnd div stops moving, even after position changes to valid number

oliv9286 avatar Oct 07 '19 23:10 oliv9286