ExecuteJavaScript requires focus
Posted: Sun Dec 22, 2024 10:21 am
Hi,
I tried to have some TButtons execute JavaScript with crm.ExecuteJavaScript(...).
However, since a recent update, it seems that CEFWindowParent1 must have the focus for ExecuteJavaScript to work.
If I click on the CEF control and then a TButton, ExecuteJavaScript works as expected.
If I directly click on a TButton when the form is loaded for instance, ExecuteJavaScript fails. Same if TButton keeps the focus after having been clicked.
Is there a workaround ?
Thanks!
I tried to have some TButtons execute JavaScript with crm.ExecuteJavaScript(...).
However, since a recent update, it seems that CEFWindowParent1 must have the focus for ExecuteJavaScript to work.
If I click on the CEF control and then a TButton, ExecuteJavaScript works as expected.
If I directly click on a TButton when the form is loaded for instance, ExecuteJavaScript fails. Same if TButton keeps the focus after having been clicked.
Is there a workaround ?
Thanks!