Previously, when an
<textarea> element received a focus with the
focus method, a caret was initially placed at the beginning of the text, and therefore, both the
selectionEnd properties on the form control would always be
Firefox 51 has changed the behaviour to follow the HTML spec, so that a caret will be placed at the end of the text, and these properties will be the same value as the text length. The
setSelectionRange method can be used to specify the selection range if needed.