Bug 32872 - Using a custom keyboard view via PageRenderer causes incorrect insets with UITableView
Summary: Using a custom keyboard view via PageRenderer causes incorrect insets with UI...
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.4
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Rui Marinho
Depends on:
Reported: 2015-08-07 12:31 UTC by Paul DiPietro [MSFT]
Modified: 2015-10-09 07:59 UTC (History)
5 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:

Reproduction project (182.07 KB, application/zip)
2015-08-07 12:31 UTC, Paul DiPietro [MSFT]

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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Paul DiPietro [MSFT] 2015-08-07 12:31:34 UTC
Created attachment 12414 [details]
Reproduction project

When using PageRenderer to override the behavior of a keyboard, it causes ListViews on any page that inherits from it to not set its insets properly. A current workaround is to search the tree of UI elements to find the view (in the case of iOS, a UITableview) within the custom renderer and/or using a DependencyService method, and then set the ContentInset to UIEdgeInsets.Zero, the ScrollIndicatorInsets to new UIEdgeInsets with 0 values. A test renderer for Android and Windows Phone to see if the behavior is different have not been added.

## Steps to reproduce

1. Create a new Forms project, and add a new base class which inherits from ContentPage. In the attached project this is called CustomKeyboardPage. Add a ListView to it.

2. Create a custom renderer for the keyboard.

3. In the main project, create a view inheriting from the CustomKeyboardPage using whichever values are desired for the ListView (in the sample app, a basic Message class is used). For the page's layout, add an Entry field/submit button to handle the addition of values for the purpose of activating the keyboard.

4. When running the application, add text to the entry and submit them. As they are added to the list, attempting to scroll through the list will show that the scrollbar is the incorrect size, and that there is a gap beneath the bottom of the list which is likely the height of the keyboard not being subtracted from it. Resetting the scroll insets manually as mentioned prior can fix this issue.

Note that not every edge case is handled here in the test case, as having ScrollTo occur at certain points makes the issue more visible.

This is apparent in Forms 1.4.4.
Comment 1 Jason Smith [MSFT] 2015-09-02 01:54:29 UTC
Should be fixed in 1.5.1-pre1
Comment 2 Parmendra Kumar 2015-10-09 07:59:21 UTC
I have checked this issue with Xamarin.Forms 1.5.1-pre1 and its working fine.

Hence closing this issue.