Rank: Member Groups: Member
Joined: 7/7/2017 Posts: 13
|
Hello, support!
We have created a WPF application that contains the latest browser element (libraries current version: EO.Total 19.1.11). In addition, we have implemented the Preload mechanism for background resource loading:
PreloadTask preloadTask = WebView.Preload(600, 800, "about:blank", (newWebView, arg) => { if (newWebView == null) { return null; }
SetupWebView(newWebView);
// load particular POST request in newWebView asynchronously
Dispatcher.BeginInvoke((Action)(() => { this.webControl.WebView = newWebView; })); return null; }, null);
BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += new DoWorkEventHandler((object o, DoWorkEventArgs args) => { preloadTask.WaitOne(); }); worker.RunWorkerAsync();
We expected the hotkeys inputed within the browser element to act for the host application, because the input message should be dispatched to the host application by default. But to our surprise it is not so!
We also tried to define our custom filter:
internal class InputMsgFilter : IInputMsgFilter { public InputMsgTarget PreDispatchMsg(int Msg, IntPtr wParam, IntPtr lParam) => InputMsgTarget.Application; }
After that we installed this filter in SetupWebView method:
private void SetupWebView(WebView webView) { webView.InputMsgFilter = new InputMsgFilter(); ... }
Unfortunately, this didn't fix the situation. When debugging we noticed that the PreDispatchMsg method has not been executed. In addition, we realized that webView.KeyDown event has not been triggered also.
WebView shortcuts work well, but they are not good solution for us, because we need our main application shortcuts be working.
Can you help us with this problem? Maybe it is something wrong in our logic?
Please advise.
Sincerely, Dmitry Anninkov.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi,
Sorry about the delay. We were able to trace to the root of this problem and the issue is on our end. We will fix the issue and post a new build as soon as possible.
Thanks!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi,
This is just to let you know that we have posted a new build that should resolve this issue. Please take a look and let us know how it goes.
Thanks!
|