Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correcting ITextPointer when using cursor indicator #10281

Closed
wants to merge 1 commit into from

Conversation

harshit7962
Copy link
Member

@harshit7962 harshit7962 commented Jan 15, 2025

Description

Using accessibility option of text cursor indicator in RichTextBox sometimes lead to crashing applications due to Invariant assert here. Adding Normalize() call in changed location moves the end to the start if this invariant assert fails and hence essentially corrects the cursor position.

Customer Impact

Accessibility fix. Allowing the usage of text cursor indicator with RichTextBox.

Regression

None

Testing

Local Build Pass
Sample Application Testing

Risk

Low

Microsoft Reviewers: Open in CodeFlow

@harshit7962 harshit7962 requested review from a team as code owners January 15, 2025 11:31
@dotnet-policy-service dotnet-policy-service bot added the PR metadata: Label to tag PRs, to facilitate with triage label Jan 15, 2025
Copy link
Member

@singhashish-wpf singhashish-wpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backporting NETFX changes.

@miloush
Copy link
Contributor

miloush commented Jan 15, 2025

So the only code change I can see is to call Normalize() on clone. Isn't the invariant supposed to hold in general? So perhaps there is a bug that if fixed, the object would be good to clone as is...

@harshit7962
Copy link
Member Author

@miloush, we have raised another change for fixing the same. PR: #10333.
Closing this PR.

cc: @h3xds1nz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants