Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Button Click doesn't work

$
0
0

I encountered a problem with Xamarin Forms with a simple login screen where I have the email/password fields and then a Submit button at the bottom. A user will enter in the email and then the password and then scroll down to click on the Submit button while the keyboard is still open. However, in this condition the Submit button's click event doesn't fire, only when the keyboard is dismissed will the Submit button actually do anything.
Does anyone know another way to do this so that it works, while keeping the spacing consistent?

Here's a simplified ContentPage of the issue:
<ScrollView HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"><br /> <Grid><br /> &lt;Grid.RowDefinitions><br /> <RowDefinition Height="250" /><br /> <RowDefinition Height="*" /><br /> <RowDefinition Height="120" /><br /> &lt;/Grid.RowDefinitions><br /> <Label Grid.Row="0" Text="Header" VerticalOptions="Center" /><br /> <StackLayout Grid.Row="1" Margin="0,32,0,15" Orientation="Vertical" Spacing="0"><br /> <StackLayout HeightRequest="92"><br /> <Label Text="Email" /><br /> <Entry Placeholder="Enter your email" /><br /> </StackLayout><br /> <StackLayout HeightRequest="92"><br /> <Label Text="Password" /><br /> <Entry IsPassword="True" Placeholder="Enter your password" /><br /> <Label Text="Forgot Your Password?" TextColor="Red" /><br /> </StackLayout><br /> </StackLayout><br /> <StackLayout Grid.Row="2" Orientation="Vertical"><br /> <Button Margin="0,0,0,16" BackgroundColor="Blue" Clicked="BtnTest_Clicked" Text="Submit" TextColor="White" /><br /> <Button Margin="0,0,0,16" BackgroundColor="Red" Text="Visit Us" TextColor="White" /><br /> </StackLayout><br /> </Grid><br /> </ScrollView>

Here's a screen recording of the issue:
https://vimeo.com/231651730


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>