-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Normalize start Text pointer to support Text Cursor Indicator #10333
base: main
Are you sure you want to change the base?
Conversation
I see change on lines 1813-15. So you get the bounding rectangle, then potentially change it and then return the previous rectangle values? Doesn't sound like the intended API experience. I also don't see how changing the order of Normalize and GetBoundingRectangle in this method changes the invariant after exiting the method. Even if the adapter called back for a clone, it would be after Normalize before the change, so putting Normalize at the beginning of Clone should have not fixed it. Can you share some of the investigation on what breaks the invariant or when? |
I agree with miloush. I'm a bit puzzled. Sharing the investigation would be great to understand this properly.
And this exactly concerns me. |
So the Flow:
|
Building upon the above comment, basically the idea of the change is that How do we certain that the start is going back to its original value post Normalize: |
@harshit7962 sorry, somehow managed to miss this. From a brief overview it makes sense with your explanation but I'm still not sure whether that's the correct solution; imho it shouldn't happen in the first place. Do we have a repro? I'd just like to step through. |
Thanks for willing to take a look into it, for the repro, use the following xaml <RichTextBox>
<FlowDocument>
<Paragraph>
<Bold>a</Bold>
<Bold>b</Bold>
</Paragraph>
</FlowDocument>
</RichTextBox> Turn on the text cursor indicator from settings. Settings -> Accessibility -> Text Cursor |
Description
Using accessibility option of text cursor indicator in
RichTextBox
sometimes lead to crashing applications due to Invariant assert here. AddingNormalize()
call in changed location moves theend
to thestart
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
Test Pass
Risk
Low
Microsoft Reviewers: Open in CodeFlow