Closed Bug 1950785 Opened 5 months ago Closed 5 months ago

Caret isn't updated correctly if set on a document by UIA

Categories

(Core :: Disability Access APIs, defect)

Desktop
Windows
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 2 open bugs)

Details

If you set the caret on a document using IA2's IAccessibleText::setCaretOffset, the caret is updated correctly. Calling IAccessibleText::caretOffset to retrieve it returns the updated offset. In contrast, if you set the caret on a document using UIA's ITextProvider::SetSelection, the caret isn't updated correctly. Calling ITextProvider::GetSelection doesn't reflect the change.

For IAccessibleText, we use HyperTextAccessible::SetCaretOffset, which calls SetSelectionRange. This in turn updates the caret with nsFocusManager. For ITextProvider, we use TextLeafRange::SetSelection, which doesn't call nsFocusManager.

I'm not sure what I did wrong in my testing, but this appears to be incorrect and this particular use case works as expected. I still think it's worth unifying the caret setting code to be consistent, both in code path and how it behaves, but that's not a UIA bug.

Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → WORKSFORME
See Also: → 1951573
You need to log in before you can comment on or make changes to this bug.