No caret in textarea when focused via Tab key
Categories
(Core :: DOM: Editor, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | wontfix |
| firefox147 | --- | wontfix |
| firefox148 | --- | verified |
| firefox149 | --- | verified |
People
(Reporter: bugzilla.mozilla.org-3, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
|
48 bytes,
text/x-phabricator-request
|
dmeehan
:
approval-mozilla-beta+
|
Details | Review |
When a <textarea> is focused via the Tab key, there is no visible caret, until I start typing or click in the field.
Steps to reproduce
- Open this URL in Firefox:
data:text/html,<input value="foo"><textarea></textarea> - Press Tab to focus the text input field. The field border turns blue, and all text in the field (i.e. “foo") is selected.
- Press Tab to focus the textarea.
Expected result
Textarea border changes to blue to indicate focus,, and a blinking caret appears at the beginning of the line.
Actual result
Textarea border changes to blue to indicate focus, but there is no blinking caret. If I start typing or click inside the textarea, the caret appears.
Notes
100% reproducible with Firefox 147.0.1 on macOS 26.1. Works fine in Chrome and Safari.
If I type something in the text field before pressing Tab to focus the textarea, the bug does not occur.
If the text field is empty, the bug does not occur: data:text/html,<input><textarea></textarea>
Possibly related to bug 1307721.
Comment 1•5 months ago
|
||
Regression window:
https://hg-edge.mozilla.org/integration/autoland/pushloghtml?fromchange=cee7118d2c8145e31b81bbc4986d01884733866c&tochange=5995c5410c543f6b21b4d1d446df8b49477aa121
Comment 2•5 months ago
|
||
:emilio, since you are the author of the regressor, bug 1887552, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Updated•5 months ago
|
| Assignee | ||
Comment 3•5 months ago
|
||
What fixes the bug is the call in the nsCaret::SetSelection(), the rest
is clean-up so we only have one source of truth for that bit.
Updated•5 months ago
|
| Assignee | ||
Updated•5 months ago
|
Comment 5•5 months ago
|
||
| bugherder | ||
Comment 6•5 months ago
|
||
The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox148towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 7•5 months ago
|
||
Comment on attachment 9538519 [details]
Bug 2011102 - Fix nsCaret visibility when switching from a non-collapsed to a collapsed selection. r=#dom-core
Beta/Release Uplift Approval Request
- User impact if declined/Reason for urgency: Relatively recent regression with a simple fix.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: comment 0
- List of other uplifts needed: none
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Relatively simple patch.
- String changes made/needed: none
- Is Android affected?: Yes
| Assignee | ||
Updated•5 months ago
|
Comment 8•5 months ago
|
||
Comment on attachment 9538519 [details]
Bug 2011102 - Fix nsCaret visibility when switching from a non-collapsed to a collapsed selection. r=#dom-core
Approved for 148.0b5
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Comment 10•5 months ago
|
||
Reproduced the issue with Firefox 149.0a1 (2026-01-18) on Windows 11. After following the steps from comment 0, there is no blinking caret displayed in the text field.
The issue is verified fixed with Firefox 148.0b5 from comment 9 and Firefox 149.0a1 (2026-01-20) on Windows 11, macOS 26 and Ubuntu 24. After following the steps from comment 0, there is a blinking caret displayed in the text field.
Description
•