Closed shariful2011 closed 4 years ago
CEF browsers in normal mode steal the focus sometimes. This is a known issue but it has some workarounds.
Read these forum threads to know more details : https://www.briskbard.com/forum/viewtopic.php?f=8&t=1467 https://www.briskbard.com/forum/viewtopic.php?f=10&t=1198
Try setting the TChromium.DefaultWindowInfoExStyle property to WS_EX_NOACTIVATE before the TChromium.CreateBrowser call.
If that solution is not enough for you then try using a browser in OSR mode. That mode gives total control of the focus.
Please, use our forum for more questions : https://www.briskbard.com/forum/index.php
How do I set OSR mode?
If your application uses VCL then use the SimpleOSRBrowser demo as a template for your application.
If it's a Firemonkey app then use the FMXExternalPumpBrowser demo.
The "off screen rendering" mode (OSR mode) needs more code and the browser has a different initialization. It's slower than the normal mode but you have absolute control.
I need to load my current text on Browser on memo onchange as I have to make a string dynamically which will load in Browser. I manage to load the string but the problem the memo is lost its focus on each keypress. How can I avoid this and load string as I write in a memo. Below is my code: