xamarin/Xamarin.Forms

[Shell] Entry Focused Event Issue

开放

#8,233 创建于 2019年10月25日

 (3 条评论) (2 个反应) (0 位负责人)C# (1,926 个派生)batch import
e/3 :clock3:help wantedinactivep/Androidt/bug :bug:up-for-grabs

仓库指标

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

描述

Description

Event Focused of a entry control is being called even when use entry.UnFocus() in OnDisappearing event.

Steps to Reproduce

  1. Create a screen with one entry control.
  2. Create a Focused event.
  3. Override OnDisappearing method and set Entry.Text = ""; Entry.Unfocus();
  4. Put a breakpoint in the entry_Focused method.
  5. IMPORTANT: Set some value in the entry control. If a value is not be setted the error will not happen.
  6. Choose another screen, anyscreen you want.
  7. Choose the again screen that you created and have the entry.

Expected Behavior

The event focused of the entry control not be called again.

Actual Behavior

The event focused of the entry control is called again. Even when you put Entry.Unfocus(); in the OnDissapearing event.

Basic Information

  • Version with issue: Xamarin.Forms.dll 4.3.0.908675
  • Last known good version: 4.3.0.908675
  • IDE: Visual Studio Professional 2019.
  • Platform Target Frameworks:
    • Android: API 22 above.
  • Android Support Library Version: 5.1 above.
  • Nuget Packages: Xamarin.Forms.dll 4.3.0.908675
  • Affected Devices: Samsung Galaxy S6, S7, S8 Plus, S10 plus, Motorola Moto E Play.

Screenshots

Screenshots attached. ShellFocusIssue.zip

Reproduction Link

https://github.com/JeysonGustavo/ShellEntryFocusedIssue

贡献者指南