Conversation
… is 0. Added check for out of bounds caret offsets to `IA2TextTextInfo.setCaretOffset` and clamped to `nCharacters`.
WalkthroughThe changes introduce enhancements to the caret management in the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
See test results for failed build of commit f32caa0e39 |
See test results for failed build of commit 98dfd1c2af |
Fix order of type hints. Make short circuit code more efficient. Co-authored-by: Leonard de Ruijter <3049216+LeonarddeR@users.noreply.github.com>
Link to issue number:
Closes #12885
Closes #16314
Summary of the issue:
When panning the display at the end of some edit controls, NVDA generates an error as it attempts to move to an offset that is out of range.
Description of user facing changes
The error is no longer encountered. This should not matter to most users, who would not have even known there was an error in the first place. As a result, I have not added a change log entry.
Description of development approach
Updated
MozillaCompoundTextInfo.moveto return0if the underlying object's text length is0.Added a check to
IA2TextTextInfo.setCaretOffsetto clampoffsettoIAccessibleText::nCharactersand log a debug warning.Testing strategy:
Tested using the repro steps in the linked issues.
Known issues with pull request:
None.
Code Review Checklist:
Summary by CodeRabbit
movemethod to handle cases where there is no content, preventing unintended behavior.