MacCatalyst - Tabbing behaviour on a scrollable page of controls is inconsistent #21101
Labels
area-controls-scrollview
ScrollView
platform/macOS 🍏
macOS / Mac Catalyst
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Milestone
Description
Relevant :
#14192
#14021
I have been yet unable to find a dynamic layout which correctly operates with keyboard navigation when combined with a ScrollView. I've tried BindableLayout on a VerticalStackLayout, CollectionView and ListView, and none are perfect.
My focus throughout this report is on MacCatalyst, but i mention Windows as a point of reference.
For context, the layout i'm working with is a page in my desktop application which contains a dynamic collection of controls, underneath of which is another non-dynamic collection of controls.
All is contained within a ScrollView as to make the page scrollable.
e.g
I'm aiming for the user to be able to use simple keyboard navigation to navigate through the entire page of controls - a feat which should be relatively simple - but is proving to be rather difficult.
With that context, this is my experience :
Tabbing inside of a BindableLayout / VerticalLayout will not scroll to the next focusable control.
Windows :
Tab
will focus on controls out of view, and will scroll the scrollview in order to achieve it (desired behaviour)MacCatalyst :
Tab
will only cycle through the controls that are already on screen, and will not scroll to focus on controls that are out of view.When using
BindableLayout
on aVerticalStackLayout
inside of aScrollView
, i.ePressing
Tab
will only cycle between controls that are already visible on screen. If a focusable control is partially on screen, it will scroll to it - so the capability for tab to initiate aScrollTo
style scroll is possible, it just simply refuses if the next focusable control is entirely out of view.I would expect
Tab
to behave the same as it does on windows, cycling between controls on the entire page and scrolling to the next focusable control when necessary.Scrolling manually to bring the fields into view makes it possible to tab to them again.
This is demonstrated in this reproduction which uses BindableLayout, or this reproduction which just uses a plain old VerticalStackLayout with nothing dynamic.
CollectionView (and ListView) will only scroll to focus controls within itself.
CollectionView is treated as a single control;
Tab
skips past the entire CollectionView.Will scroll to focus controls within the collection view 👍 , but transitioning focus to controls below the CollectionView on the page is inconsistent.
CollectionView
is notably better than BindableLayout in it's ability to scroll to the next focusable field, providing of course that the controls all reside withinCollectionView
. By pressingTab
i can scroll through the page successfully, until I reach the end of theCollectionView
, andshift+tab
will navigate in reverse up through the entire page. 👍The problems with collection view's tabbing behaviour begin after reaching it's bottom.
Problem A
Once i reach the end of the
CollectionView
, the page exhibits the same behaviour mentioned previously of refusing to scroll to focus the controls in theGrid
below theCollectionView
.Providing the
grid
below theCollectionView
remains out of view after reaching the bottom of the collection, The user is required to manually scroll the grid into view to make tabbing to controls within it possible.Problem B
Once the focus does transition from the
CollectionView
to theGrid
of controls below,Tab
can only cycle between the controls visible on screen again.From here,
Tab
cannot cycle to the top of the page, only to the top of the controls visible on screen.It also becomes impossible to use
shift+tab
to navigate back up to entire page. It only cycles through the controls on screen.You're stuck navigating the controls present on-screen until you click on a control within the
CollectionView
, which re-enables the ability toshift+tab
back through the page.Collection View Repro
List View Repro
Visual Demo
See the window titles for the type of layout used in each window.
shift+tab
fails to scroll back up the page.repro.mov
Steps to Reproduce
No response
Link to public reproduction project repository
https://github.com/jdngray77/maui-maccatalyst-tabbing
Version with bug
8.0.6 SR1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
macOS
Affected platform versions
Sonoma 14.2.1 (23C71)
Did you find any workaround?
No
Relevant log output
The text was updated successfully, but these errors were encountered: