-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
WPF Moved capture into Opened/Closed events for Popup #1938
Conversation
Do you have a link to the relevant file on the reference source? |
Here is the link: https://referencesource.microsoft.com/#PresentationFramework/src/Framework/System/Windows/Controls/ComboBox.cs,26d4d26579e03147 The basics I learned from there are to capture when the ComboBox is activated and release capture when it is closed and the ComboBox is still capturing. I think I need to work on this a bit more, I believe I broke use cases where a drag starts in the web browser and ends outside, I will update the pull request shortly. |
cf0ad7a
to
3b40ca0
Compare
I had a user testing this change for a few days and they didn't notice any issues. Not sure if there is any further testing you would like me to do or where to go from here? |
@taylorjonl What was the end result with this? |
For testing I used |
The changes I made to support what I thought was drag'n drop broke it. I pushed a new commit removing the code in the OnMouse[Up|Down] so it is back to the code I had my user testing. Drag'n drop still works with the code deleted so I am not really sure the purpose of the code. Before these changes combo boxes works because whenever the popup was entered it was capturing the mouse but the mouse and popup events were fighting a lot over capture which may be why the crash was occurring. |
Code looks a lot cleaner now 👍 Overall I'm thinking it might be just easier to forward the mouse events directly, I'm not sure why Feedback welcome. |
I actually like that solution better, what are the chances you would do a new package against 55 with that change? The crash related to this capture is #2 on my list of crashes in my application and my managers are trying to chase %99.999 stability rate. |
Is your company interested in sponsoring a |
This is my personal GitHub account, contact me at [email protected] and we can discuss this further. |
This commit is an attempt to fix the bug mentioned in this issue:
#1723
I modeled this change after the way the WPF ComboBox captures the mouse by looking at the code on referencesource.microsoft.com. It needs further testing to verify it doesn't break other stuff, hoping to get some more testing from one of my users tomorrow, wanted to start the conversation.