Skip to content

WebBrowser control blocks accelerators of buttons on form #8862

Description

@WolfgangHG

.NET version

.NET 6.0, .NET 7.0

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

.NET 4.8

Issue description

See attached sample: I have a "System.Windows.Forms.WebBrowser" control on a UserControl.
The UserControl and the root form contain buttons with accelerator keys. In .NET6, the accelerators for the buttons don't work reliable.

Steps to reproduce

Focus the textbox on the UserControl, then press "Alt" and one of the accelerator keys "B" or "O".

  • The button on the user control will be clicked when pressing the accelerator the second time. On first button press, nothing happens.
  • The "OK" button on the root form is never called.

The sample also has target framework 4.8 to demonstrate that this it worked there.

WebBrowserTest.zip

The event "WebBrowserControl.PreviewKeyDown" is called twice for each button. This means I cannot handle a "Alt + accelerator" press myself (and search for a button with this accelerator).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

💥 regression-releaseRegression from a public release🚧 work in progressWork that is current in progressarea-COMpriority-2Work that is important, but not critical for the releasetenet-compatibilityIncompatibility with previous versions or with WinForms for .NET Framework

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions