-
Notifications
You must be signed in to change notification settings - Fork 986
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
Fixed the issue where edit textBox loses focus when using up/down to switch property values on edit textBox #12431
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12431 +/- ##
===================================================
+ Coverage 75.65407% 75.73581% +0.08173%
===================================================
Files 3150 3153 +3
Lines 635831 635797 -34
Branches 47020 46973 -47
===================================================
+ Hits 481032 481526 +494
+ Misses 151352 150839 -513
+ Partials 3447 3432 -15
Flags with carried forward coverage won't be shown. Click here to find out more.
|
The private dlls have been tested, no regression issue was found. |
@@ -3997,7 +3997,7 @@ private void Refresh(bool fullRefresh, int startRow, int endRow) | |||
startRow = 0; | |||
} | |||
|
|||
if (fullRefresh || OwnerGrid.HavePropertyEntriesChanged()) | |||
if (OwnerGrid.HavePropertyEntriesChanged()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
COuld you please help me understand this fix? I would expect that in this scenario OwnerGrid.HavePropertyEntriesChanged is true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When setting a property, the SetPropertyValue
method is called. In this method, the Refresh
method is called to refresh the property list based on the Attribute of the property.
But in fact, when setting the AutoSize
property, the number and structure of properties in the property list will not change. We only need to refresh the linked property values, so there is no need to recreate the property list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we switch the value of the edit text by pressing the up and down keys, the SelectAll
event will be called, and this event will eventually enter the SelectInternal
method. The AI notification is sent from the SelectInternal
method here, but the notification sent here is UIA_Text_TextSelectionChangedEventId
. If we add notification UIA_AutomationFocusChangedEventId
to it, this problem also can be resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But in fact, when setting the AutoSize property, the number and structure of properties in the property list will not change. We only need to refresh the linked property values, so there is no need to recreate the property list.
Please verify this with a Label control and Multiline property ( if still applicable to the new approach)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please test with NVDA and JAWS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the changes and the TextBox does not lose focus when you press up/down.
Changes LGTM.
Tested this PR change with several regression issues found. Need to investigate. |
9bf352b
to
7b9e0f2
Compare
@Tanya-Solyanik The second commit caused 3 unstabled regression issues, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, let's remove the fullRefresh
test.
Fixes #12440
Proposed changes
Customer Impact
Regression?
Risk
Screenshots
Before
The rectangle always back to focus on entire row after using the up/down changed the property values directly in the edit textbox
After
The rectangle in the edit text box always stays in the edit textbox when changing the property value using the up/down buttons
Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow