servo / servo/servo

`<textarea>`'s `setRangeText()` doesn't visually update element until after it next receives text input

Open
#47,752 4 comments 0 reactions 1 assignee View on GitHub

@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>
  1. Click "Click here".
  2. Textarea is not updated.
  3. Click in textarea and press any character-inputting key.
  4. Textarea changes to "Habanero" plus whatever character you inserted.

Platform:
Win 10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.