Selection updates from Web APIs should scroll to reveal selection in scrollable containers
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 202
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the issue's scrollable-container HTML case and the selection.collapse(target.firstChild, 5) example. Read the selection Web API specification and compare the listed Chromium, Safari, and Firefox behavior. Done means the specification defines whether selection changes scroll the closest scrollable ancestor to reveal the selection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100