maui
maui copied to clipboard
MAUI Blazor Hybrid macOS does not react to [Tab] [Up] [Enter] keys etc.
Description
It is not possible to tab navigate between html element on a page in BlazorWebView, on macOS ( MacCatalyst) . It works fine under Windows and for regular Blazor apps on macOS.
Steps to Reproduce
- Create a new MAUI Blazor Hybrid app, with the standard template.
- Add a couple of
<input>elements to the index page - Run and place cursor in first
<input>element and press [Tab] on your keyboard - Focus does not change to next
<input>element.
Other elements like dropdowns, does not recieve [up][down] [enter] etc.
Link to public reproduction project repository
https://github.com/LccBuild/MauiNoTabsOnmacOS
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
macOS
Affected platform versions
13
Did you find any workaround?
No
Relevant log output
No response
@LccBuild can you try this scenario with a default WebView control (not Blazor Hybrid) and see if the issue still persists or not? Thanks!
Hi @LccBuild. 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.
@LccBuild can you try this scenario with a default WebView control (not Blazor Hybrid) and see if the issue still persists or not? Thanks!
I have created a non MAUI project that uses a WKWebView control, and it seems it has the same issue:
using WebKit;
namespace TestKeys;
[Register ("AppDelegate")]
public class AppDelegate : UIApplicationDelegate {
public override UIWindow? Window {
get;
set;
}
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
// create a new window instance based on the screen size
Window = new UIWindow (UIScreen.MainScreen.Bounds);
// create a UIViewController with a single UILabel
var vc = new UIViewController ();
Window.RootViewController = vc;
WKWebView webView = new WKWebView(vc.View.Frame,new WKWebViewConfiguration());
vc.View.AddSubview(webView);
var url = new NSUrl("https://google.com");
var request = new NSUrlRequest(url);
webView.LoadRequest(request);
// make the window visible
Window.MakeKeyAndVisible ();
return true;
}
}
@mkArtakMSFT Any news on this? It is a very serious issue, that stops keyboard navigation in all Blazor Hybrid apps.
Cross-linking to https://github.com/dotnet/maui/issues/13934
Seems to be a very broad issue that is not .NET specific at all. It might be an issue with the actual WKWebView control on MacCatalyst: https://developer.apple.com/forums/thread/721141
Closing as dupe of https://github.com/dotnet/maui/issues/13934 because it's the same fundamental issue: the native WebView used in Mac Catalyst has an issue with keyboard presses. See the other issue for more details.
To anyone seeing this issue: On whichever Mac you are seeing this issue, can you tell us what type of Apple hardware you have?
To find this info:
- On your Mac, click on the Apple logo at the upper-left corner of the screen, then select About This Mac
- It will say "Processor" or "Chip" and next to that it will say either Intel (such as Intel Core i7) or Apple (such as Apple M1)
To anyone seeing this issue: On whichever Mac you are seeing this issue, can you tell us what type of Apple hardware you have?
Hi @Eilon I experience this on a MacBook Pro M1 Max
@Eilon I'm having this issue on a 16" Macbook Pro M1. Tab works fine on Windows but doesn't do a thing on mac.