react-rnd
react-rnd copied to clipboard
setting position to NaN crashes RnD component
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
- use the "Set NaN" button to set RnD position (either x or y) to NaN
- Try dragging the RnD div, it will not move because position is not a valid number
- Click the "Set 10" button, this resets the position to 10, a valid number
- 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