xamarin/Xamarin.Forms

Entry focus issue inside ListView

开放

#1,600 创建于 2018年1月18日

 (34 条评论) (0 个反应) (0 位负责人)C# (1,926 个派生)batch import
a/listviewe/3 :clock3:help wantedm/high impact :black_large_square:p/Androidt/bug :bug:up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Description

There seems to be a bug when using the focus event of an Entry inside a listview. I've created a test app that contains a listview with a datatemplate selector. Some rows will render an Entry that has a focus function, these rows have a blue background. When the Entry is focussed the text is changed to the current datetime. The other rows are normal Entries that do nothing when focussed, these rows have a green background. Focussing the first blue Entry will enter the current datetime in that Entry. Focussing the first green Entry will cause the text of the first blue Entry to be updated continuously, trying to type in the green Entry won't add any text. Focussing any of the other blue Entries will cause the text of that Entry and the text of the first Entry to be updated continuously.

Note: tested on Android version 6.0 and 7.0. Not sure if this occurs on iOS as well. Note: tested with cachingstrategy RetainElement and RecycleElement, results are the same.

Steps to Reproduce

  • Run the test app
  • Tap on first Entry, the current datetime will appear in the Entry
  • Tap on second Entry, the current datetime will be updated in the first Entry continuously
  • Tap the third Entry, the current datetime will be updateed in the first and third Entry continuously

Expected Behavior

Focussing an Entry sets the text to the current date.

Actual Behavior

The text of two entries are updated in an infinite loop.

Basic Information

  • Version with issue: 2.5.0.122203
  • Last known good version: unknown
  • IDE: Visual Studio
  • Platform Target Frameworks:
    • Android: tested on 6.0 and 7.0
  • Android Support Library Version: 25 DataTemplateSelector.zip

贡献者指南