Closed Bug 1965405 Opened 11 months ago Closed 11 months ago

Hang when erasing text in a text box at the end of a document with Narrator

Categories

(Core :: Disability Access APIs, defect)

Desktop
Windows
defect

Tracking

()

VERIFIED FIXED
140 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox138 --- unaffected
firefox139 --- disabled
firefox140 --- verified

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: hang, regression, Whiteboard: [uiaShipBlocker])

Attachments

(1 file)

STR (with Narrator):

  1. Open this test case:
    data:text/html,a<input value="bc">
  2. Tab to the input.
  3. Press end to move the cursor to the end of the input.
  4. Press backspace.
    • Expected: "c" should be erased and Narrator should say "c"
    • Actual: Firefox hangs and stops responding forever.

We're getting stuck in an infinite loop in GetAttributeValue trying to retrieve the UIA ReadOnly text attribute. I'm not yet sure whether UIA is calling us in a loop or whether we're getting stuck in a loop ourselves. I'm hoping the latter, as the former will be a lot harder to track down.

Set release status flags based on info from the regressing bug 1957314

This is the scenario for this bug:

  1. A UIA client retrieved a range for the caret at the end of a text input at the end of a document, collapsed at (input, 2).
  2. Backspace was pressed, removing the last character, so (input, 2) was no longer valid.
  3. The UIA client attempted to call GetAttributeValue on the previously fetched range.
  4. FindTextAttrsStart couldn't move further, so it returned the document end point, (input, 1).
  5. Because the range contained (input, 2), the search point was never less than the end point, so we got stuck in an infinite loop in GetAttributeValue.

To fix this, UiaTextRange now restricts offsets to the length of the leaf Accessibles when reconstructing the TextLeafRange.

Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a8f93bb27d15 When reconstituting a TextLeafRange for a UiaTextRange, restrict offsets to the current lengths of Accessibles. r=morgan
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
QA Whiteboard: [qa-triage-done-c141/b140][qa-ver-needed-c141/b140]
Flags: qe-verify+

I was able to reproduce the issue with Firefox Nightly 140.0a (2025-05-08), on Windows 11, as described in Comment 0.
Verified as fixed using Firefox 140.0b2 (with the "accessibility.uia.enable" pref set to "2") and Firefox Nightly 141.0a1 (2025-05-27), on Windows 11. The hang is no longer occurring when erasing text in a text box at the end of a document with Narrator.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triage-done-c141/b140][qa-ver-needed-c141/b140] → [qa-triage-done-c141/b140][qa-ver-done-c141/b140]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: