Current spec doesn't define whether setting selection through Web APIs should scroll to reveal the selection.
Case: Caret in scrollable container
<div style="width: 200px; height: 50px; overflow: auto;">
<p>Line 1</p>
<p>Line 2</p>
<p id="target">Line 3 - below fold</p>
</div>
selection.collapse(target.firstChild, 5);
Browser behaviors:
Chromium - No scroll, caret not visible
Safari - No scroll, caret not visible
Firefox - Scrolls to reveal caret ✓
Proposed Behaviour
Selection should scroll the closest scrollable ancestor to reveal the selection.