Skip to content

[BUG] [iOS] CollectioView hosted in PopupV2 doesn't select an item unless you hold a row for longer than 4 second #2727

@MichaelShapiro

Description

@MichaelShapiro

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

CollectionView hosted inside the PopupV2 doesn't acknowledge item selection tap unless you tap and hold the row for more than 4 seconds. Android works fine. I tested with "old" CollectionView and with CV2 -the same behavior. Video is attached.

Expected Behavior

Tapping on a CollectionView with SelectionMode="Multiple" or "Single" must actually select the tapped item (same as on Android as shown in the attached video)

Steps To Reproduce

Follow the repository link, run the project "PopupV2Bugs", tap the button "CV2 selection bug"


Host a CollectionView inside the PopupV2
Populate CollectionView with some data
Set SelectionMode="Multiple" (or "Single")
Show popup
on iOS device - Tap any item in the CollectionView

Expected result:

  • item remains selected (highlighted)
  • SelectionChanged event fires

Actual:

  • item remains unselected
  • SelectionChanged doesn't fie
  • only when you hold an item for longer than 4 seconds the above two actions happen
PopupV2_SelectionBug.mp4

Link to public reproduction project repository

https://github.com/MichaelShapiro/MauiBugs/tree/ad48ce23ab1548c10e90b55ccdef65264a9f2ab7/PopupV2_CV2_Selection

Environment

----------------------
OS: Windows 10
Visual Studio 2022 v 17.14.5

----------------------
nugets installed:
<PackageReference Include="CommunityToolkit.Maui" Version="12.0.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.70" />

----------------------
dotnet --list-sdks

9.0.301 [C:\Program Files\dotnet\sdk]


--------------------
dotnet workload list

Installed Workload Id      Manifest Version       Installation Source
---------------------------------------------------------------------
android                    35.0.61/9.0.100        VS 17.14.36203.30
ios                        18.4.9288/9.0.100      VS 17.14.36203.30
maccatalyst                18.4.9288/9.0.100      VS 17.14.36203.30
maui-windows               9.0.51/9.0.100         VS 17.14.36203.30

Anything else?

Again, I have tested with "old" CollectionView and with the new version - CV2. Result is the same: iOS doesn't immediately select the tapped item... unless you tap and hold for 4 seconds.

As far as why I need a CollectionView insidea popup - I have a need to present a list of dates in the popup for the user to make a selection. Here is the example of a working popup (before I updated tp V2)

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions