-
Notifications
You must be signed in to change notification settings - Fork 1k
Unhook the mouse down hook at the end of PropertyGridView.ProcessEnumUpAndDown #12508
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
Unhook the mouse down hook at the end of PropertyGridView.ProcessEnumUpAndDown #12508
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12508 +/- ##
===================================================
+ Coverage 75.73242% 75.83103% +0.09860%
===================================================
Files 3153 3163 +10
Lines 635807 636411 +604
Branches 46975 47000 +25
===================================================
+ Hits 481512 482597 +1085
+ Misses 150870 150351 -519
- Partials 3425 3463 +38
Flags with carried forward coverage won't be shown. Click here to find out more. |
...orms/src/System/Windows/Forms/Controls/PropertyGrid/PropertyGridInternal/PropertyGridView.cs
Show resolved
Hide resolved
No new issue was found with the private dlls |
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.
Looks good
…UpAndDown (dotnet#12508) * Unhook the mouse down hook at the end of PropertyGridView.ProcessEnumUpAndDown * Removing ? from code line "EditTextBox?.SelectAll();"
…r experience in dropdown type editors in property grid (#12605) Backport of #12508, #12431, #12356 and #12479 to release/9.0 Fixes #12607 NET10 Bugs: #12434, #12421, #12440, #12031 Bug Description There are four issues that occur when using the up/down keys to switch property values in the property page. When navigating to "Auto Size" dropdown using the up/down arrow keys, it is getting auto selected without hitting ENTER After using Tab to switch property values, then using the up/down keys to switch items in the drop-down box expanded by F4 will cause the drop-down box to collapse directly [Accessibility] When using up/down to toggle property value on edit text box, The Accessibility rectangle focuses on the entire property row instead of the original edit text box [Accessibility] Narrator cannot announce items correctly when switching the items by using up/down keyboard arrow that without expand the dropdown list panel Customer Impact PropertyGrid drop down type editor does not support conventional keyboard navigation. Usually, selection is committed when the ENTER key is pressed. However, in this case value is committed on the Down arrow press. Then the drop down list is expanded, the screen reader user might want to navigate through all values in the drop down using the arrows, on each arrow key press the new item should be presented (and announced) in the selection text box, however, the drop down is closed on the first arrow key. According to the accessibility SMEs, this is a major problem - the keyboard users are losing their work by committing a wrong value. Screen reader user don't get correct feedback when navigating through the drop down list.
Fixes #12434
Root cause:
After changing the value by pressing up/down keyboard directly in EditTextbox, the
EditTextBox.HookMouseDown
will be set to TrueThe stack trace:
then pressing
Alt+Down
to open the DropDown list, and select a item, the CommitValue will be invoked.At this time,
EditTextBox.HookMouseDown = true
. In HookMouseDown, theFocus()
was invoked, so the DropDown list was collapsed.Proposed changes
EditTextBox.HookMouseDown = false
at the end of PropertyGridView.ProcessEnumUpAndDownCustomer Impact
Regression?
Risk
Screenshots
Before
Pressing Up/Down keyboard in drop-down list of property collapses dropdown directly.

After
When pressing the up/down keyboard in the property drop-down list, the drop-down menu will not be collapsed directly

Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow