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

CollectionView ItemsUpdatingScrollMode and deselect not working on macOS #21236

Open
andrewstellman opened this issue Mar 15, 2024 · 1 comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/macOS 🍏 macOS / Mac Catalyst t/bug Something isn't working
Milestone

Comments

@andrewstellman
Copy link

andrewstellman commented Mar 15, 2024

Description

The CollectionView control's ItemsUpdatingScrollMode does not seem to work on macOS (.NET 8.0.3). In this screenshot:

image

(screenshot from maui-collectionview-bug repo)

Clicking the button adds an item to the ObservableCollection that the CollectionView is bound to. The CollectionView has ItemsUpdatingScrollMode="KeepLastItemInView" set. I'm seeing two problems:

Problem 1: When running on Windows, when more items are added than fit in the view, it automatically scrolls to display the new item added. But when running on macOS, it does not automatically scroll, and seems to ignore the ItemsUpdatingScrollMode property.

Problem 2: When running on Windows, holding down control and clicking a selected item deselects it. On macOS, deselection does not seem to work when pressing option-click, control-click, or command-click.

Version info:

% dotnet workload list

Installed Workload Id      Manifest Version      Installation Source
--------------------------------------------------------------------
maui                       8.0.3/8.0.100         SDK 8.0.100        

Use `dotnet workload search` to find additional workloads to install.

Steps to Reproduce

  1. Add a CollectionView control to a page in a MAUI app and bind it to an ObservableCollection. Make sure it has the ItemsUpdatingScrollMode="KeepLastItemInView" and HeightRequest="125" properties.
  2. Run the app in macOS and add a bunch of items to the ObservableCollection so there .

Expected: The CollectionView scrolls to keep the last item in view.
Actual: The CollectionView does not scroll.

  1. Click to select an item.
  2. Control-click, option-click, or command-click to deselect the selected item.

Expected: The item is deselected
Actual: Nothing happens

Note that running in Windows returns the expected results, but running in macOS does not.

Link to public reproduction project repository

https://github.com/andrewstellman/maui-collectionview-bug/

Version with bug

8.0.3 GA

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

No response

Did you find any workaround?

Unfortunately, no.

Relevant log output

No response

@andrewstellman andrewstellman added the t/bug Something isn't working label Mar 15, 2024
@ninachen03
Copy link
Collaborator

Verified this issue with Visual Studio for mac 17.6.10 (build428), can repro it on Maccatalyst platform with sample project.
ScrollMode

@ninachen03 ninachen03 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Mar 18, 2024
@PureWeen PureWeen added platform/macOS 🍏 macOS / Mac Catalyst area-controls-collectionview CollectionView, CarouselView, IndicatorView labels Mar 18, 2024
@PureWeen PureWeen added this to the Backlog milestone Mar 18, 2024
@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/macOS 🍏 macOS / Mac Catalyst t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants