xamarin/Xamarin.Forms

[Bug] Setting Android's SoftInputMode to Resize breaks entry focusing on ListView's Header

Aperta

#7168 aperta il 15 ago 2019

 (3 commenti) (0 reazioni) (0 assegnatari)C# (1926 fork)batch import
a/listviewhelp wantedinactivep/Androidt/bug :bug:up-for-grabs

Metriche repository

Star
 (5644 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Description

If we have a ListView with a Header, containing at least 2 entries, setting the Android's UseWindowSoftInputModeAdjust to Resize causes the entries focusing to be incorrect. See the attached project below.

Steps to Reproduce

  1. Create a page with only 1 ListView. It can have no records, it doesn't matter. The issues happens with or without items in the ListView
  2. Set the ListView's header to a content (StackLayout, Grid, etc) which is having several (at least 1) entries
  3. Set the page's SoftInputMode to Resize
  4. Try to focus on one of the entries, besides the first one. For the example, let's say that we click on the second entry

Expected Behavior

The second entry is gaining the keyboard focus

Actual Behavior

The second entry is gaining the keyboard focus for a millisecond and then the focus automatically shifts to the first entry

Basic Information

  • Version with issue: 4.1.0.673156, but it also happens with the latest pre-release - 4.2.0.673161-pre3
  • Last known good version: N/A
  • IDE: Visual Studio Enterprise 2019 16.2.1 (windows)
  • Platform Target Frameworks:
    • Android: 9.4.1.0
  • Android Support Library Version: 28.0.0.1
  • Nuget Packages: N/A
  • Affected Devices: Reproducing it on several diffrerent Android devices with Android version 8, 9, 10.

Reproduction Link

DemoSoftInputModeIssue.zip

Guida contributor