You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When a WinForms WebView2 control is a child element of a ContainerControl, shift+tab navigation cannot move focus out of the WebView. While focus cannot escape the WebView in the reverse direction, it can escape the WebView in the forward direction.
This bug affects the BlazorWebView WinForms control, which extends ContainerControl and wraps the WebView2 control.
Version
SDK: 1.0.1369-prerelease
Runtime: Stable 105.0.1343.53
Framework: WinForms
OS: Windows 11 Enterprise Version 22H2
Repro Steps
Create a new Windows Forms App (.NET 7) and add a reference to Microsoft.Web.WebView2.
Replace the code in the Form1 constructor with the following:
Repeatedly press tab, observing that the focus correctly enters and exits the WebView.
Repeatedly press shift+tab, observing that focus gets trapped inside the WebView.
Expected behavior: When the first HTML element in the WebView has focus and shift+tab is pressed, the Windows Forms control previous to the WebView2 control should receive focus.
Actual behavior: When the first HTML element in the WebView has focus, shift+tabbing results in the last element in the WebView receiving focus.
Hi @MackinnonBuck, thanks for your report, it seems a bug exists, I will track it internally.
If this blocks your work, as a current alternative, you can use Controls.Add(webView), instead of using ContrainerControl to wrapper webview2
This issue is shown as fixed in the release notes for 1.0.1777-prerelease. I was hopeful that the same fix might have helped with #951 , but that issue still reproduces.
Description
When a WinForms
WebView2
control is a child element of aContainerControl
, shift+tab navigation cannot move focus out of the WebView. While focus cannot escape the WebView in the reverse direction, it can escape the WebView in the forward direction.This bug affects the
BlazorWebView
WinForms control, which extendsContainerControl
and wraps theWebView2
control.Version
SDK: 1.0.1369-prerelease
Runtime: Stable 105.0.1343.53
Framework: WinForms
OS: Windows 11 Enterprise Version 22H2
Repro Steps
Microsoft.Web.WebView2
.Form1
constructor with the following:Expected behavior: When the first HTML element in the WebView has focus and shift+tab is pressed, the Windows Forms control previous to the
WebView2
control should receive focus.Actual behavior: When the first HTML element in the WebView has focus, shift+tabbing results in the last element in the WebView receiving focus.
Screen recording
winforms_tab_navigation.mp4
Additional context
dotnet/maui#8293
AB#43460910
The text was updated successfully, but these errors were encountered: