`<textarea>`'s `setRangeText()` doesn't visually update element until after it next receives text input
Open
@adity1raut is already working on this.
Since Sep 5, 2026.
A-content/script
C-assigned
C-has-manual-testcase
E-less-complex
- Dominant language
- Rust
- Stars
- 38k
- Forks
- 3.8k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 465
Description
Describe the bug:
See below.
To Reproduce:
<!doctype html>
<textarea id="Z">Hello</textarea><a href="#" id=Y>Click here</a>
<script>
Y.onclick = () => Z.setRangeText("abaner",1,4)
</script>
- Click "Click here".
- Textarea is not updated.
- Click in textarea and press any character-inputting key.
- Textarea changes to "Habanero" plus whatever character you inserted.
Platform:
Win 10
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.
Assessment
This issue has not been assessed yet.