Gecko Html Plugin running inside of Outlook panel gets duplicate backspace keys

Add-in Express™ Support Service
That's what is more important than anything else

Gecko Html Plugin running inside of Outlook panel gets duplicate backspace keys
 
mitchell balsam




Posts: 8
Joined: 2017-01-27
We are currently using Gecko FX V45.0.34 (the latest version) as an embedded web-browser inside of a panel in Outlook using VSTO V3.3 Release (build 2435)

We are experiencing a strange issue where the backspace key is duplicated when its pressed in an HTML form. So if I type 12345 and then press the backspace key the letters 123 remain. Another part of the plugin uses a windows form control using a simple Text Field. It does NOT have the same problem.

This is what we know.

-Gecko is running on the main thread.
-Using Spy++ and watch the events/keystrokes sent to gecko running inside of Regions for Outlook, we see only one backspace event.
-If we hook the keypress event in gecko browser we see two backspace events occurring.
-If we create a Windows forms application and we embed the Gecko Browser inside of it we do NOT have this issue.

Are there any other tests we should try to narrow down the problem?

In a related topic:

We have tried to use Internet Explorer, Chromium, and Gecko. Gecko was the only one that worked.

Question: Have others have better luck with other web-browser plugins? If so which ones??

Thanks
Posted 28 Mar, 2018 13:20:11 Top
OliverM


Guest


Just to put my 2 cents in:
I tried Chromium, Gecko, CefSharp and CefGlue. They all turned out as unusable in a MSO host app (doubled events, lost events, cross-thread calls failing) The only control not showing strange behavior was the MS WebBrowser control. But the WebBrowser can only handle old-fashioned sites. If you try to show a site made with bootstrap it start's getting funny. I don't believe there is currently a working solution.
Posted 29 Mar, 2018 03:39:39 Top
mitchell balsam




Posts: 8
Joined: 2017-01-27
Oliver

Thanks for the 2c.. Its saved us a lot of time looking internally for the issue.

I have an idea, tell me what you think.

I found a related post

https://social.msdn.microsoft.com/Forums/office/en-US/0e411bc7-1dba-4a22-86a6-20529e4fe8ea/focus-problems-with-task-pane-and-webcontrol-in-outlook?forum=outlookdev&forum=outlookdev

They're trying to track down a similar type of issue involving textbox focus messages. But in the post, an MS Employee says, that MS will help fix the problem for free if its business critical. For me, this is a critical problem since I can?Â?Ð?ét sell my product without a reliable solution.

I'm going to write to request their help. Would you mind if I reference you as another individual looking for a solution? I think I?Â?Ð?ém going to ask Add-in-express if they have similar problems.

My ask is going to be:
1) Determine the source of the problem (double events, missing events) that occurs with third-party plugins. If there is no workaround then ask #2
2) Determine why the WebBrowser control has problems with modern (bootstap,angular) based apps. if no workaround is possible, then ask #3
3) When will the internal WebBrowser control be updated to use Edge or IE?

Thoughts?
Posted 29 Mar, 2018 13:07:47 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Mitchell,

We suggest that you try to manipulate the value returned by PreProcessMessage():

public class MyBrowser : WebBrowserGekkoEtc
{
    public override bool PreProcessMessage(ref Message msg)
    {
        return false;  //base.PreProcessMessage(ref msg);
    }
}


If you find that returning false solves some of the issues, you can further experiment with the value returned.

In case you use an Add-in Express pane, you can also try to use the ADXKeyFilter event in this way:

private void ADXOlForm1_ADXKeyFilter(object sender, ADXOlKeyFilterEventArgs e)
{
    if (ActiveControl == webBrowser1 && e.KeyCode == Keys.Back)
        e.Action = ADXOlKeyFilterAction.SendToHostApplication;
}


Also, with WebBrowser, you can play with its compatibility; see https://blogs.msdn.microsoft.com/patricka/2015/01/12/controlling-webbrowser-control-compatibility/.


Andrei Smolin
Add-in Express Team Leader
Posted 30 Mar, 2018 04:50:26 Top
OliverM


Guest


Hi Mitchell,

I can't imagine MS is able to solve issues caused by 3rd party lib's. I tested Telerik and DevExpress pdf viewer controls. Both work OK in a Winform app, both fail in a MSO host environment (not loading documents, crashing when using the built-in search, making the host app hang on shutdown and other issues). It seems that some of the companies are not designing their products for use in an add-in architecture.

In addition there are MSO related issues. As a simple example take 2 forms 1 blocking, 1 non blocking. Put a textbox on it and try to type something in. In the blocking form it works, in the non blocking form it does not.
I am sure the Add-In Express guys can extend the list with a lot of other examples.

I don't mind if you reference me and I would love to work with a MS WebBrowser control which is able to process http://www.bbc.com/ correctly.
Posted 30 Mar, 2018 04:53:25 Top
mitchell balsam




Posts: 8
Joined: 2017-01-27
Oliver,

I agree, MS won't fix issues with 3'rd party apps, but my guess is the problem is not the 3'rd party apps, but the way we're hosting the control. We're not overloading the right callbacks or something like that.

BTW, we found a way to code around the backspace issue, but I'm sure there will be other problems as we do more...

Were in the process of trying Andrei suggestions...

Will let you know what we find out.

Mitch
Posted 02 Apr, 2018 16:50:24 Top