Do you want to request a feature or report a bug?
Report a bug. 馃悰
What is the current behavior?
Trying to move the cursor in a contenteditable div, calling setSelectionRange
on that div throws a TypeError:
element.setSelectionRange is not a function
Example code
https://jsfiddle.net/9xjma402/
What is the expected behavior?
Caret is moved, setSelectionRange is a function
Environments tested on
React 15.5.4
Chrome 57, Safari 10
macOS Sierra
Welp, setSelectionRange is of HTMLInputElement
s and doesn't extend to contenteditable things. My bad, closing. Sorry!
Most helpful comment
Welp, setSelectionRange is of
HTMLInputElement
s and doesn't extend to contenteditable things. My bad, closing. Sorry!