xamarin/Xamarin.Forms

[Bug] FontImageSource on ImageButton prevents click gesture

Open

#6,716 opened on Jun 30, 2019

 (1 comment) (1 reaction) (0 assignees)C# (1,926 forks)batch import
a/imagebuttone/3 :clock3:hackathonhelp wantedinactivet/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Description

I have the following XAML. The Clicked handler is NEVER received.

<ImageButton
                    Aspect="AspectFit"
                    BackgroundColor="transparent”
                    VerticalOptions="Center"
                    Grid.Column="0"
                    Padding="5"
                    Clicked="Handle_CloseClicked">
                    <ImageButton.Source>
                        <FontImageSource
                            FontFamily="{StaticResource FontAwesome}"
                            Glyph="{x:Static local:IconFont.Times}"
                            Color="{StaticResource cerulean}" />
                    </ImageButton.Source>
                </ImageButton>

When I change the background to Red for example, I can touch the lower part when I do NOT click on the FontImageSource. It would seem that the transparent background is not clickable, and the FontImageSource is also not clickable. Both ought to be.

Basic Information

  • Version with issue: 4.2.0.569926-nightly
  • Platform Target Frameworks:
    • iOS: 12.2

Screenshots

https://www.dropbox.com/s/36eyzoow8eghf0o/2019-06-29_20-21-32.mp4?dl=0

Reproduction Link

https://github.com/davidortinau/Xappy/blob/master/Xappy/Xappy/Content/Settings/SettingsPages.xaml#L36

Contributor guide