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

Tap Events Incorrectly passed Through Button #26640

Open
david-maw opened this issue Dec 15, 2024 · 0 comments
Open

Tap Events Incorrectly passed Through Button #26640

david-maw opened this issue Dec 15, 2024 · 0 comments
Labels
area-gestures Gesture types potential-regression This issue described a possible regression on a currently supported version., verification pending t/bug Something isn't working

Comments

@david-maw
Copy link

Description

Clicks are passed through a button to the underlying control, for example using this XAML:

    <ContentPage.ToolbarItems>
        <ToolbarItem Text="Clear Log" Command="{Binding ClearLogCommand}"/>
    </ContentPage.ToolbarItems>
    <Grid>
        <Grid.GestureRecognizers>
            <TapGestureRecognizer 
                CommandParameter="On Page Root (Grid)"
                Command="{Binding ShowTapCommand}"/>
        </Grid.GestureRecognizers>

        <Border Padding="2">
            <Label Text="{Binding CommandLog, TargetNullValue='No events logged' }" FontSize="Micro"/>
        </Border>
        <Button Text="Clear Log" Command="{Binding ClearLogCommand}" VerticalOptions="End"/>
    </Grid>

Tapping anywhere on the page will log an event on the page, tapping the button, or the ToolBar item, should clear the log page but tapping the button ALSO registers a tap on the page.

It works correctly on Android or using Microsoft.Maui.Controls Version 9.0.14, it just fails on 9.0.21.

Steps to Reproduce

  1. Clone the repository, build and run the app on Windows
  2. Tap on the center of the page and a Tap will be logged
  3. Tap on the toolbar item and the log will be cleared and a message written to it to that effect.
  4. Tap on the button and the log will be cleared but ALSO a tap on the page will be logged.
  5. Repeat on Android or with an earlier Microsoft.Maui.Controls and tapping the button will just clear the log, as expected.

Link to public reproduction project repository

https://github.com/david-maw/SimpleCollectionView-Propagation.git

Version with bug

9.0.21 SR2.1

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.14 SR1.4

Affected platforms

Windows, I was not able test on other platforms

Affected platform versions

Windows 11

Did you find any workaround?

No

Relevant log output

@david-maw david-maw added the t/bug Something isn't working label Dec 15, 2024
@jfversluis jfversluis added area-gestures Gesture types potential-regression This issue described a possible regression on a currently supported version., verification pending labels Dec 16, 2024
@jfversluis jfversluis added this to the .NET 9 Servicing milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-gestures Gesture types potential-regression This issue described a possible regression on a currently supported version., verification pending t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants