maui
maui copied to clipboard
CollectionView does not allow clicking of child elements
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
- create a Listview or CollectionView
- add a label with a formattedText value of a clickable url
- 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
This feels like an input transparency issue. Are you sure the Label control gets clicked?
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
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.
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.
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.
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
This issue should be fixed by this PR - #12027
sounds good looking forward to this getting merged
Do we have a workaround at this time?
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.
Verified this issue with Visual Studio Enterprise 17.7.0 Preview 1.0. Not repro on Android platform with sample project. HyperLinksNotClickable