Skip to content

Fix UIATextInfo and MSHTMLTextInfo, updateCaret without selecting text#13902

Merged
seanbudd merged 2 commits into
masterfrom
fixUpdateCaret
Jul 14, 2022
Merged

Fix UIATextInfo and MSHTMLTextInfo, updateCaret without selecting text#13902
seanbudd merged 2 commits into
masterfrom
fixUpdateCaret

Conversation

@seanbudd

@seanbudd seanbudd commented Jul 14, 2022

Copy link
Copy Markdown
Member

Link to issue number:

Fixes #13899

Summary of the issue:

Using Notepad on Windows 11, performing Say All (nvda+downArrow|nvda+a) selects each line of text.

This is because UIATextInfo.updateCaret = UIATextInfo.updateSelection, so updating the caret sets the selection.

The same problem exists with MSHTMLTextInfo

Description of user facing changes

Say All no longer highlights each line of text.

Description of development approach

  1. Copy the text info
  2. Collapse the new text info (e.g the range endpoints become (start, start))
  3. Set the selection on the new range

Testing strategy:

Test with STR in #13899 with Notepad
Test Say All with Internet Explorer as well.

Known issues with pull request:

Change log entries:

Fixes unreleased regression

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English

@seanbudd seanbudd requested a review from a team as a code owner July 14, 2022 03:34
@seanbudd seanbudd requested a review from feerrenrut July 14, 2022 03:34
@seanbudd seanbudd changed the title Fix TextInfo Update Caret Fix UIATextInfo Update Caret Jul 14, 2022
Comment thread source/NVDAObjects/UIA/__init__.py
@seanbudd seanbudd requested a review from feerrenrut July 14, 2022 04:06
@seanbudd

Copy link
Copy Markdown
Member Author

Note that this issue can be reproduced with Internet Explorer as well

@seanbudd

seanbudd commented Jul 14, 2022

Copy link
Copy Markdown
Member Author

I've checked all instances of updateCaret being defined, I believe this is only an issue with UIATextInfo and MSHTMLTextInfo

@seanbudd seanbudd changed the title Fix UIATextInfo Update Caret Fix UIATextInfo and MSHTMLTextInfo, updateCaret without selecting text Jul 14, 2022
@seanbudd seanbudd merged commit 1d43ec8 into master Jul 14, 2022
@seanbudd seanbudd deleted the fixUpdateCaret branch July 14, 2022 23:23
@nvaccessAuto nvaccessAuto added this to the 2022.3 milestone Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NVDA incorrectly selects text when performing a say all in Notepad

3 participants