-
-
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
Clicking on Control using Winforms does not Set Focus #570
Comments
Not all the Focus event handlers have been implemented, there's a very old PR that I created here #341 Feel free to take it for a spin. |
Okay I've implemented the code changes from #341 and I've found that OnGotFocus() from your code does get called, but it doesn't look like any handler was implemented. Am I right in saying that? At current time it appears that it doesn't do anything, so I've been playing with it, but so far coming up way short. |
@RadicalLinux Not sure if it helps you any more, but I found a hack to make this work for my case. If you paste this into |
Thanks, I'm giving it a try now. |
Hey guys, thanks for the great workaround. Almost got it working for me.. almost. My problem is that the workaround is causing Chromium to lose focus for a short time. This destroys functionality in my app because as a graphics editor it relies heavily on mouse event handling.Any ideas on how to fix this? |
You could try posting a different message type instead of WM_LBUTTONDOWN? See here for the messages that will cause the ToolStrip to close:
http://referencesource.microsoft.com/#System.Windows.Forms/winforms/Managed/System/WinForms/ToolStripManager.cs,1249
|
This is it! Thank you so much. When posting WM_NCLBUTTONDOWN (0x00A1), cef doesn't lose focus and handles the following mouse click correctly. |
@jankurianski Is it worth adding your |
@asdorius No, thank you. 👍 I had a bug in my app when running on VMs where the I've updated my |
Good idea. It's too hacky to be built-in to the |
When using docking tabs menus etc. that should automatically close when they no longer have focus, clicking on the browser does not fire the event needed. You can duplicate the issue by running the winforms example. After the browser is fully loaded click on the edit menu. Now click back on the browser. The edit menu will not close like it should. Also the mouse events are not triggered.
BTW All the other issues have been resolved! Great Work!
The text was updated successfully, but these errors were encountered: