-
-
Notifications
You must be signed in to change notification settings - Fork 366
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
CEF bug the modal stack in application #282
Comments
Thank you for reporting this issue! |
This seems to be a Delphi 7 issue : Replace the MessageDlg line with this : |
The problem is that this bug occurs with other modals of my application and not only the MessageDlg. |
Please, use our forums and provide all the details to find workarounds like the previous MessageBox example. |
@salvadordf , I tried to change your code at I will to test harder this solution and will report. This change was based on post: https://www.briskbard.com/forum/viewtopic.php?t=723#p3299 |
I'm glad that it worked for you but please, also read the linked CEF issue. Another developer using CEF4Delphi pointed out some possible side effects : |
DefaultWindowInfoExStyle is used to initialize the browser window with that ExStyle. In some cases a focus issue may be fixed if we use the WS_EX_NOACTIVATE value instead of 0 but it may have some side effects. This could be used to fix issue #282
I just uploaded a new version of CEF4Delphi with a new TChromium.DefaultWindowInfoExStyle property to modify the ExStyle easily. Try setting it to WS_EX_NOACTIVATE before the TChromium.CreateBrowser call. |
Solved! Thanks! PS: there will be a release or just download the master version? |
That feature is only available at the master version at this moment. |
@salvadordf sorry to inform, but this not solved the problem at all. Sometimes the bug continues to occur... I found this at chromium repository: https://bitbucket.org/chromiumembedded/cef/issues/1856/branch-2526-cef-activates-browser-window I think this problem is a "old friend" of CEF.... I tried also to use the As
|
CEF and Chromium have a special way to create the embedded browsers that can create issues as the one you linked. Delphi also has its own issues with modal forms created behind the visible form but most of them were fixed in the latest Delphi version. In fact, the MessageDlg issue you describe here can only be reproduced in Delphi 7. When I tried it in Delphi 10 it worked perfectly which means that it's probably a Delphi 7 issue. It can be tricky to find a fix when you mix all of these possible focus issues in one application. If you can't find a workaround for Delphi 7 then you can try 2 other browser configurations :
Please, use our forums for more questions : |
I'm using CEF4Delphi to display some charts. This charts are created using ApexCharts.
At this charts, there are a "hamburguer" icon on the right, who opens a popupmenu (pure html). When my user click on it my delphi application bug the modals.
All modals after clicking on the hamburguer are created behind the main form. And I cannot access them anymore.
Here is the bug:
And here is the code:
bug-cef.zip
My application is build with Delphi 7.1 enterprise (I'm not able to migrate to a new delphi version because incompatible routines).
And the windows host is Windows 7 x64 (6.1.7601). On Windows 10 (for example) it doesn't occurs.
The problem also occurred in WIndows 2008 R2 (6.1.7601).
The text was updated successfully, but these errors were encountered: