Open
Description
While several selection setter APIs including setSelectionRange()
allows selection inside text controls ( and <textarea>), there is no straightforward way to scroll to the selected range without hacks.
Gecko has a nonstandard behavior where those APIs always scroll to the internal focus offset, and I'd like to standardize this behavior:
- Specify what Gecko does (always scroll to the internal focus offset)
- Or, add a parameter to setSelectionRange:
setSelectionRange(start, end, { scroll: true, direction })
- Or, add a method
scrollToFocus()