-
Notifications
You must be signed in to change notification settings - Fork 49.2k
Closed
Description
Looking at this code:
react/packages/react-dom/src/client/ReactInputSelection.js
Lines 91 to 100 in bee4baf
if ('selectionStart' in input) { | |
// Modern browser with input or textarea. | |
selection = { | |
start: input.selectionStart, | |
end: input.selectionEnd, | |
}; | |
} else { | |
// Content editable or old IE textarea. | |
selection = ReactDOMSelection.getOffsets(input); | |
} |
When would selectionStart
not exist? According to http://help.dottoro.com/ljtfkhio.php, only in IE8. (It might be wrong though.)
It would be nice to check, and remove the relevant code if it's supported everywhere else.