maui icon indicating copy to clipboard operation
maui copied to clipboard

CollectionView does not allow clicking of child elements

Open LennoxP90 opened this issue 3 years ago • 2 comments

Description

I have an application that utilized Listview for this behaviour in XF, I would like to switch to CollectionView in MAUI

I have a messaging application that has the ability to click on url links that are embedded into messages and open the appropriate browser

In MAUI with the CollectionView my Label Span is not clickable, the listview just selects the row but does not propagate the tap to the label

Steps to Reproduce

  1. create a Listview or CollectionView
  2. add a label with a formattedText value of a clickable url
  3. try to click the label on both CollectionView or ListView

Expected Outcome: should open the browser and navigate to the URL Actual Outcome: nothing happens when you click collectionview but selects the row when you click listview

Link to public reproduction project repository

https://github.com/LennoxP90/HyperLinksNotClickable

Version with bug

6.0.486 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android 30 on Emulator

Did you find any workaround?

No response

Relevant log output

No response

LennoxP90 avatar Sep 19 '22 20:09 LennoxP90

This feels like an input transparency issue. Are you sure the Label control gets clicked?

AmSmart avatar Sep 21 '22 00:09 AmSmart

interesting i didn't think of this I added a gesture recognizer directly to the label control

<Label FormattedText="{Binding Text}">
  <Label.GestureRecognizers>
    <TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
  </Label.GestureRecognizers>
</Label>

now my span command is being executed but the TapGestureRecognizer_Tapped is not being called updated repro with the behaviour

LennoxP90 avatar Sep 21 '22 00:09 LennoxP90

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

ghost avatar Sep 23 '22 14:09 ghost

Facing this issue on Android in both SR5 (.NET 6) and RC1 (.NET 7).

Even the SelectionChangedCommand of the CollectionView is not getting triggered.

As an alternate implementation, have tried defining the Tap gesture as part of the control within the item template of the CollectionView, but NO change in behavior.

Request to look into this issue on priority as CollectionView is the much needed control.

egvijayanand avatar Oct 03 '22 14:10 egvijayanand

Facing this issue on Android in both SR5 (.NET 6) and RC1 (.NET 7).

Both SelectionChangedCommand and Tap gesture work fine on the Windows platform and I couldn't able to test on other platforms due to infra issues.

egvijayanand avatar Oct 03 '22 14:10 egvijayanand

some regressions have happened and my hack is no longer working in latest MAUI 7.0.59 with iOS Android seems to still work fine

LennoxP90 avatar Feb 03 '23 05:02 LennoxP90

This issue should be fixed by this PR - #12027

AmSmart avatar Feb 03 '23 14:02 AmSmart

sounds good looking forward to this getting merged

LennoxP90 avatar Feb 03 '23 15:02 LennoxP90

Do we have a workaround at this time?

insolito86 avatar Mar 17 '23 01:03 insolito86

Hi @LennoxP90. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

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.

ghost avatar May 23 '23 08:05 ghost

Verified this issue with Visual Studio Enterprise 17.7.0 Preview 1.0. Not repro on Android platform with sample project. HyperLinksNotClickable

jinxinjuan avatar May 23 '23 09:05 jinxinjuan