xamarin/Xamarin.Forms

[Bug] [iOS] Button inside a ScrollView does not work when keyboard is up.

Open

#6,409 opened on Jun 4, 2019

 (2 comments) (3 reactions) (0 assignees)C# (1,926 forks)batch import
e/3 :clock3:help wantedp/iOS 🍎t/bug :bug:up-for-grabs

Repository metrics

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

Description

Description

If a Button is inside a ScrollView and the keyboard is showing, tapping the button will not trigger the button's command. Through testing it appears that the Button.Pressed event IS fired, but the Button.Released and Button.Clicked events ARE NOT fired.

Note: The odd behavior is only evident when the button is moved from it's original position via scrolling while the keyboard is up.

This bug was reported and acknowledged on bugzilla but does not appear to have been moved to github: https://bugzilla.xamarin.com/show_bug.cgi?id=59113

Steps to Reproduce

  1. Create a ScrollView.
  2. Create a TextField and Button inside the ScrollView.
  3. Add a Command to the button.
  4. Launch the app and focus the TextField so the keyboard appears.
  5. Scroll so that the button is visible (or simply scroll to move the button to a new position).
  6. Tap the button.

Expected Behavior

When the button is tapped the command should trigger.

Actual Behavior

When the button is tapped the keyboard disappears but the button command does not trigger.

Basic Information

  • Version with issue:
  • Last known good version:
  • IDE:
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP:
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices:

Reproduction Link

See: https://bugzilla.xamarin.com/show_bug.cgi?id=59113

Contributor guide