use-editable icon indicating copy to clipboard operation
use-editable copied to clipboard

Uncaught DOMException: Failed to execute 'getRangeAt' on 'Selection': 0 is not a valid index.

Open kof opened this issue 3 years ago • 0 comments

Hi, just bumped into this, the solution is to check selection.rangeCount !== 0 before calling selectino.getRangeAt(0)

https://stackoverflow.com/questions/22935320/uncaught-indexsizeerror-failed-to-execute-getrangeat-on-selection-0-is-not

I got into this because I called getState() while disabled option is true

kof avatar Feb 24 '22 11:02 kof