Bug 59113 - Button click doesn't fire with scroll and keyboard open
Summary: Button click doesn't fire with scroll and keyboard open
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.4.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-08-30 14:55 UTC by Lawrence
Modified: 2018-01-18 19:35 UTC (History)
3 users (show)

Tags: button, event, scroll, keyboard, ac
Is this bug a regression?: ---
Last known good build:

Zipped up demo solution (596.56 KB, application/x-zip-compressed)
2017-08-30 14:55 UTC, Lawrence

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 59113 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Lawrence 2017-08-30 14:55:33 UTC
Created attachment 24480 [details]
Zipped up demo solution

Overview: More detailed restatement of summary.

Clicking on a button with the keyboard opened and focused to a entry field with the scroll view scrolled down a bit doesn't trigger the button event in a nested layout.  The button's event does fire in a simple layout say just a single stacklayout.

Steps to Reproduce: Minimized, easy-to-follow steps that will trigger the bug. Include any special setup steps.

1) Create ContentPage as follows:
<ScrollView HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
                <RowDefinition Height="250" />
                <RowDefinition Height="*" />
                <RowDefinition Height="120" />
                VerticalOptions="Center" />
                <StackLayout HeightRequest="92">
                    <Label Text="Email" />
                    <Entry Placeholder="Enter your email" />
                <StackLayout HeightRequest="92">
                    <Label Text="Password" />
                    <Entry IsPassword="True" Placeholder="Enter your password" />
                    <Label Text="Forgot Your Password?" TextColor="Red" />

            <StackLayout Grid.Row="2" Orientation="Vertical">
                    TextColor="White" />
                    Text="Visit Us"
                    TextColor="White" />

2) Load the content page on the phone or simulator, click on the entry and type in some text (with the keyboard still open and focus is on the entry) try to press on the Submit button.

The keyboard dismisses, the view gets scrolled back up.  But the button click event doesn't fire.

Expected Results: 
The Submit button's click event should have fired along with the keyboard dismissing and the view scrolling.

Build Date & Hardware: Date and hardware of the build in which you first encountered the bug.

Visual Studio Enterprise 2017 15.4.0 Preview 1.0
Xamarin.iOS and Xamarin.Mac SDK

Additional Builds and Platforms: Whether or not the bug takes place on other platforms (or browsers, if applicable).

Doesn't appear to happen in Android, only in iOS

Additional Information: Any other useful information. 
I have a screen capture of it happening: https://vimeo.com/231651730
I clicked the Submit button a total of 5 times.  The first 2 times were with the keyboard open and describes this bug.  The 3rd and 4th time were just normal button clicks (works as expected).  The 5th time was with the keyboard open again.
Comment 1 Paul DiPietro [MSFT] 2017-08-30 15:20:07 UTC
Thanks for providing a reproduction project; I'll set this to confirmed for now as it occurs with the provided 2.4.0-pre2 build as stated (as well as the stable build).
Comment 2 Victor 2018-01-18 19:35:21 UTC
As a work around, using a label with a gesture recognizer will work instead of a button.