Open rachelkang opened 1 year ago
This only happens with Shell. Does not appear to be an issue when Shell is not being used Issue is present in as far back as .NET 6
Verified this on Visual Studio Enterprise 17.9.0 Preview 1(8.0.3). Repro on Android 14.0-API34 with Maui template: MauiApp1.zip
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.
I can confirm this is still an issue with .NET 8.0.302. It's only happening when using Shell. It also happens on iOS when a bluetooth keyboard (or barcode scanner) is attached.
I can confirm this is still an issue with .NET 8.0.302. It's only happening when using Shell. It also happens on iOS when a bluetooth keyboard (or barcode scanner) is attached.
This is inaccurate. I just upgraded to .NET 8.0.302 / 8.0.61 SR6.1 and, unfortunately, it still happens with NavigationPage
in my org's project. I was able to reproduce in Android 8 and 11.
In fact, this issue appears to happen to any Layout
-derived class too, including Grid
and StackLayout
.
For these layouts, I've tried using VisualStateManager
to modify the behavior when "Focused", no dice. Also, I've tried using other approaches, like a custom handler, but no good - although the colors would change and merely "darkens/shades" the view a bit.
Further, was using a LayoutHandler.Mapper.AppendToMapping entry to modify the PlatformView.BackgroundTintList = Android.Content.Res.ColorStateList.ValueOf(_grid_.BackgroundColor.ToAndroid())
, but no go.
Using the following properties was just as futile:
LayoutHandler.Mapper.AppendToMapping(... (h, v) =>
{
...
h.PlatformView.Focusable = false;
h.PlatformView.FocusedByDefault = false;
h.PlatformView.FocusableInTouchMode = false;
});
@PureWeen, or anyone else, we could really use your valuable input on this one. If you have a workaround, it would be greatly appreciated if you can share it!
If you disable hot reload do you still see the same issue?
If you disable hot reload do you still see the same issue?
@PureWeen yes
Description
Page appears to receive keyboard focus when it should not
Video demonstrates the outcome of repeatedly hitting the Tab Key. The highlighted area represents the object receiving keyboard focus, and can be seen toggling between the whole page and the button:
https://user-images.githubusercontent.com/21988533/233414540-a8ee40cf-232b-4787-a04f-4697f540954e.mp4
Steps to Reproduce
Link to public reproduction project repository
https://github.com/dotnet/maui
Version with bug
8.0 previews
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android API 33
Did you find any workaround?
No response
Relevant log output
No response