Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backwards tab navigation cannot move focus away from a Windows Forms BlazorWebView #8293

Closed
MackinnonBuck opened this issue Jun 23, 2022 · 7 comments
Assignees
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView platform/windows 🪟 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@MackinnonBuck
Copy link
Member

Description

When using backwards tab navigation (shift+tab) on the children of a BlazorWebView, focus cannot escape the WebView. When the first child of the WebView is focused, shift+tabbing results in the last child of the WebView receiving focus rather than the native control whose tab index precedes that of the BlazorWebView.

This does not reproduce on the Windows Forms WebView2 control, so it does appear to be specific to Blazor Hybrid.

Steps to Reproduce

  1. Create a File > New Windows Forms App
  2. Follow the steps here to turn the project into a Windows Forms Blazor app
  3. Add two Button controls to Form1, where the tab order goes "button1 > blazorWebView1 > button2"
  4. Run the app
  5. Click on button1 so it receives focus.
  6. Press "tab"
  7. The focus should now be on the "Click me" button in the WebView
  8. Press "shift+tab", and note that the focus still remains on the "Click me" button
  9. Press "tab" and note that the focus escapes the WebView to button2

Version with bug

6.0.400 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Tested on Windows 11 Enterprise, Version 21H2

Did you find any workaround?

I did not find a workaround.

Relevant log output

No response

@MackinnonBuck MackinnonBuck added t/bug Something isn't working area-blazor Blazor Hybrid / Desktop, BlazorWebView labels Jun 23, 2022
@kristinx0211
Copy link

@MackinnonBuck can you share the repro project please?

@kristinx0211 kristinx0211 added the s/needs-info Issue needs more info from the author label Jun 24, 2022
@ghost
Copy link

ghost commented Jun 24, 2022

Hi @MackinnonBuck. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@ghost ghost added the s/no-recent-activity Issue has had no recent activity label Jun 28, 2022
@ghost
Copy link

ghost commented Jun 28, 2022

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

@MackinnonBuck
Copy link
Member Author

I've added a repro project here: https://github.com/MackinnonBuck/BlazorWebViewWinFormsTabNavigationBug

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author s/no-recent-activity Issue has had no recent activity labels Jun 28, 2022
@kristinx0211 kristinx0211 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jun 29, 2022
@kristinx0211
Copy link

confirm same as above description. when the click me button is focused, shift+tab results in Dummy2 focus, not button1.
https://user-images.githubusercontent.com/99457000/176342990-a122d6b0-7a7a-4122-a892-827f72db219a.mp4

@MackinnonBuck
Copy link
Member Author

I was able to reproduce this issue when wrapping a WebView2 control in an otherwise empty ContainerControl and reproduce the same issue, so I've opened MicrosoftEdge/WebView2Feedback#2835 to track this getting resolved.

@MackinnonBuck
Copy link
Member Author

Closing since this is a bug with the WebView2 Windows Forms control and we have a separate issue tracking that.

@MackinnonBuck MackinnonBuck closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Nov 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView platform/windows 🪟 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants