Bug 42096 - [iOS] Entry Text Binding fails when iOS Auto-corrects text when the Entry loses focus (clicking outside of Entry)
Summary: [iOS] Entry Text Binding fails when iOS Auto-corrects text when the Entry los...
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.3.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-06-23 01:55 UTC by Jon Goldberger [MSFT]
Modified: 2016-12-01 20:02 UTC (History)
5 users (show)

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

Test Project (17.06 KB, application/zip)
2016-06-23 01:55 UTC, Jon Goldberger [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 Jon Goldberger [MSFT] 2016-06-23 01:55:07 UTC
Created attachment 16449 [details]
Test Project

## Description

Entry Text Binding fails when iOS Auto-corrects text when the Entry loses focus (clicking outside of Entry). To clarify, this mean that if you do not accept iOS's auto-correctoin suggestion and juts click outside if the Entry so the Entry loses focus. However iOS does not always automatically use the suggested correction when the Entry loses focus, but when it does the corrected value that iOS inserts is not reflected in the bound property of the Entry. This is not an issue on Android because it seems Android only inserts an auto-correction if you explicitly select the auto-correction suggestion. 

Note that if you do explicitly select the auto-correction suggestion on iOS then the binding works as expected. 

## Steps to reproduce

1. Make sure that Auto-Correction is enabled on the iOS device/sim in Settings -> General -> Keyboard. And if using a simulator, do not use the Hardware keyboard as you will not get auto-correctoin suggestions when using the Hardware Keyboard, so in the iOS Simulator app, deselect "Connect Hardware Keyboard" from the Hardware->Keyboard menu. 

2. Open that attached test project and deploy to iOS simulator/device.

3. Click in the Entry field at the top.

4. use the soft keyboard to enter "ar". You will see suggestion for "at". (Note that what you type is reflected in the Label below the Entry field... these should always match. Also the value of the bound property is written to the console, and that should also always match what is in the Entry field)

5. Click outside of the Entry field... do _not_ select the suggestion. 

Expected result: Both the Entry field and the Label (and what is written to the console) will match, all should be "at"

Actual result: Entry field shows "at" but console output and Label show "ar". IOW the EntryValue property of the ViewModel was not set when iOS inserted the suggestion of its own volition. 

## Environment

Xamarin Forms version

=== Xamarin Studio Enterprise ===

Version 6.0.1 (build 8)
Installation UUID: ceaba76c-db06-4fbd-b326-f69ea53c3e01
	Mono 4.4.1 (mono-4.4.0-branch-c7sr0/4747417) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404010000

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.3.1 (10188.1)
Build 7D1014

=== Xamarin.Android ===

Version: (Visual Studio Enterprise)
Android SDK: /Users/jongoldberger/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 25.1.7
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.3

Java SDK: /usr
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

Android Designer EPL code available here:

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: (Visual Studio Enterprise)

=== Xamarin.iOS ===

Version: (Visual Studio Enterprise)
Hash: 3cf8aae
Branch: c7sr0
Build date: 2016-06-20 16:09:58-0400

=== Build Information ===

Release ID: 600010008
Git revision: 0ecc3639cde21616d675e4fdef1b858d166dd065
Build date: 2016-06-20 13:16:51-04
Xamarin addins: a9252e6df4851fbbed1f9c6228e7b6dd1b475ac5
Build lane: monodevelop-lion-cycle7-sr0

=== Operating System ===

Mac OS X 10.11.5
Darwin Jons-MacBook-Pro.local 15.5.0 Darwin Kernel Version 15.5.0
    Tue Apr 19 18:36:36 PDT 2016
    root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Xamarin Inspector
Comment 2 Richard 2016-11-17 02:25:31 UTC
Any update on this? I'm also experiencing this issue, running XF version 2.3.2
Comment 3 Richard 2016-11-17 03:29:40 UTC
Looks like a fix for this has been made and is due for release in 2.3.4-pre1
Comment 4 Samantha Houts [MSFT] 2016-12-01 20:02:15 UTC
Should be fixed in 2.3.4-pre1. Thanks!