Welcome Guest Search | Active Topics | Sign In | Register

Menu items trigger too often Options
PS
Posted: Thursday, June 27, 2019 6:23:40 AM
Rank: Advanced Member
Groups: Member

Joined: 10/24/2018
Posts: 97
We're having the following serious issues in production:
1. We have a menustrip with as (one of the) items Settings > Sound > Switch on.
2. The user has the focus inside the browser, so for example the search bar in Google.
3. The user presses Alt+S expecting to open the Settings menu.
4. In reality the Settings menu, the Sound menu item and the Switch on menu item get opened. This results in very unexpected behavior and also will toggle any checkboxes as menu items.
5. A similar issue exists when there is a menu with (at least) two menu items "Settings" and "Sound", when an user presses Alt+S the expectation is that the Settings menu item is highlighted, but in reality the Sound menu is highlighted, in fact the last possible matching menu item is always highlighted.

Please fix this as soon as possible as our users are facing serious issues.

Sample code to reproduce steps 1 through 4:

Quote:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

using EO.WebBrowser;
using EO.WinForm;

namespace EOTestFileMenu
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(CreateNewForm());
}

private static Form CreateNewForm()
{
var form = new Form
{
Size = new System.Drawing.Size(1280, 1024)
};

var menuStrip = new MenuStrip
{
Dock = DockStyle.Top
};
var soundMenuItem = new ToolStripMenuItem("Sound", null, new ToolStripMenuItem("Switch on"));
var settingsMenuItem = new ToolStripMenuItem("Settings", null, soundMenuItem);
menuStrip.Items.Add(settingsMenuItem);

form.Controls.Add(menuStrip);

var webView = new WebView
{
Url = "https://www.google.com"
};

var webControl = new WebControl
{
Dock = DockStyle.Fill,
WebView = webView
};

form.Controls.Add(webControl);

return form;
}
}
}
eo_support
Posted: Monday, July 1, 2019 11:33:34 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,070
Hi,

We have looked into this issue and it appears that Windows unnecessary inserted a WM_CHAR message into the application's message queue in this case. We have added code to "eat" this extra message and during our test it seems to work well. You can try it on your end once the new build is out and see if it works for you. We will reply here again once the new build is ready.

Thanks!
eo_support
Posted: Friday, July 5, 2019 2:46:46 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,070
Hi,

This is just to let you know that we have posted a new build that should resolve this issue. You can download the new build from our download page. Please take a look and let us know how it goes.

Thanks!
PS
Posted: Monday, July 8, 2019 4:26:54 AM
Rank: Advanced Member
Groups: Member

Joined: 10/24/2018
Posts: 97
Hello,

We have tested your new build and it still has the same issue. When we press Alt+S then Settings > Sound > Switch on are still all opened and highlighted.
Please add a TextBox to the form and observe that when you put the focus in that textbox and press Alt+S then Settings > Sound gets opened and highlighted as intended, and only with an additional S keypress the Switch on menu is opened and highlighted.

We're looking forward to a fix for this issue.
eo_support
Posted: Monday, July 8, 2019 8:35:23 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,070
We actually did add a textbox into your test code and verified that as well. We will check again and see if we missed anything.
eo_support
Posted: Friday, July 12, 2019 1:53:15 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,070
We have tested this again on our system and we do not see any issues. Specifically, the "sound" menu item's sub menu will not open and "switch on" will not be highlighted. We tested this both on 1803 and 1809. Could this be another issue related to your Windows version?
PS
Posted: Monday, July 15, 2019 5:02:12 AM
Rank: Advanced Member
Groups: Member

Joined: 10/24/2018
Posts: 97
We doubt that it is related to our Windows version as we have updated a while ago, I'll try to describe the issue again as clearly as possible.

winver output:
Quote:

Microsoft Windows
Version 1809 (OS Build 17763.615)

Windows 10 Pro


We have used the following code:
Quote:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

using EO.WebBrowser;
using EO.WinForm;

namespace EOTestFileMenu
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(CreateNewForm());
}

private static Form CreateNewForm()
{
var form = new Form
{
Size = new System.Drawing.Size(1280, 1024)
};

var menuStrip = new MenuStrip
{
Dock = DockStyle.Top
};
var soundMenuItem = new ToolStripMenuItem("Sound", null, new ToolStripMenuItem("Switch on"));
var settingsMenuItem = new ToolStripMenuItem("Settings", null, soundMenuItem);
menuStrip.Items.Add(settingsMenuItem);

form.Controls.Add(menuStrip);

var webView = new WebView
{
Url = "https://www.google.com",
};

var webControl = new WebControl
{
Dock = DockStyle.Fill,
WebView = webView
};

var textBox = new TextBox
{
Dock = DockStyle.Bottom
};

form.Controls.Add(webControl);
form.Controls.Add(textBox);

return form;
}
}
}


We built a Release build for the x64 platform and executed the executable found in the bin\x64\Release folder, just to be sure that Visual Studio has no influence on it. We built it using Microsoft Visual Studio 2017 Version 15.0.28307.586.

We also get the following license message (as we have not entered the license code in our test application)
Quote:

A license is needed for the following Essential Objects product(s) (V2019.1.95.0):
- EO.WebBrowser for .NET


When we execute the program we have the following paths.

Path 1, focus inside the Windows Forms textbox at the bottom fo the form:
1. Press Alt: The "Settings" menu gets highlighted.
2. Press S: The "Settings" menu opens and the "Sound" menu gets highlighted.
3. Press S: The "Sound" menu opens and both the "Sound" menu and "Switch on" menu item get highlighted.

This is the expected behavior.

Path 2, focus inside the textfield (searchbar) of Google, so within the webbrowser:
1. Press Alt: The "Settings" menu gets highlighted.
2. Press S: Both the "Settings" menu and the "Sound" menu open and the "Sound" menu and "Switch on" menu item get highlighted.

This is not the expected behavior. While testing this I just now noticed that this only reproduces if you pause between pressing Alt and pressing S.

We hope that this gives you enough information to reproduce our issue.
eo_support
Posted: Monday, July 15, 2019 2:07:49 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,070
Ah. Thanks for the details. We are able to reproduce the problem now.

The difference between our steps and your steps is we press Alt + S together. In another word, our sequence is:

1. Alt down;
2. S down;
3. Alt/S up (which key up first does not matter);

Your sequence is:

1. Alt down;
2. Alt up;
3. S down;
4. S up;

If we release Alt first and then press S, we see the problem. We will investigate this further and reply here again when we have more information.

Thanks!

eo_support
Posted: Monday, July 22, 2019 4:57:24 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,070
Hi,

This is just to let you know that we have posted a new build that should resolve this issue. You can download the new build from our download page. Please take a look and let us know how it goes.

Thanks!
PS
Posted: Tuesday, July 23, 2019 6:09:30 AM
Rank: Advanced Member
Groups: Member

Joined: 10/24/2018
Posts: 97
We tested it in our actual application and it appears to be working as intended, thank you!
eo_support
Posted: Tuesday, July 23, 2019 8:49:23 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,070
You are very welcome. Thanks for confirming the fix!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.