xamarin/Xamarin.Forms

[Shell] Entry Focused Event Issue

Aperta

#8233 aperta il 25 ott 2019

 (3 commenti) (2 reazioni) (0 assegnatari)C# (1926 fork)batch import
e/3 :clock3:help wantedinactivep/Androidt/bug :bug:up-for-grabs

Metriche repository

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

Descrizione

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

Guida contributor