Bug 38204 - [iOS] Picker Fires SelectedIndexChanged Early
Summary: [iOS] Picker Fires SelectedIndexChanged Early
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS (show other bugs)
Version: 2.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-01-29 20:08 UTC by Jimmy [MSFT]
Modified: 2017-10-23 13:51 UTC (History)
8 users (show)

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

repro solution (48.69 KB, application/zip)
2016-01-29 20:08 UTC, Jimmy [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 Jimmy [MSFT] 2016-01-29 20:08:58 UTC
Created attachment 14804 [details]
repro solution

### Overview
The Picker on iOS fires off the SelectedIndexChanged event as the user scrolls through the items in the control, not after an item is actually selected.

### Steps to Reproduce
1. Run the attached iOS project
2. Open the Picker and scroll through the items

### Expected Results
Selecting an item from the Picker will update the Label beneath the Picker.

### Actual Results
The Label is updated as the items in the Picker are scrolled through.

### Testing Info
I was able to reproduce this on Forms 2.0.1 and 2.1-pre3. However, this does not occur on the default Forms 1.3.5 from the new project template. So indicates that this is a regression introduced since then.
Comment 1 Jimmy [MSFT] 2016-01-29 23:03:51 UTC
Just to clarify, the issue doesn't happen when the user is actually scrolling, but when they highlight the item in the Picker and don't select "Done". 

So if one iterates through the items one by one, the label in the sample project changes each time a new item is highlighted.
Comment 2 adrianknight89 2016-10-20 21:31:58 UTC
See https://github.com/xamarin/Xamarin.Forms/pull/478
Comment 3 Rui Marinho 2016-12-20 20:09:33 UTC
Comment 4 Rui Marinho 2017-01-04 13:16:20 UTC
Should be fixed in 2.3.4-pre2
Comment 5 Parmendra Kumar 2017-01-30 18:32:42 UTC
I have checked this issue with Xamarin.Forms and this issue is not reproducible with latest forms version I am getting same behaviour with Android and iOS. Hence marked this issue as Verified Fixed.
If you still facing same issue please feel free to reopen this issue.

Comment 6 fangspeen 2017-10-04 13:57:20 UTC
I have the same issue as described on iOS 11 simulator using Xamarin.Forms
Comment 7 blitzillu 2017-10-23 13:32:03 UTC
I'm using an iOS Device (iPad with 10.3.3) with Xamarin.Forms and I'm also experiencing the same issue. In which XF version is this fixed? Also this


doesn't seem to exist. Here (https://forums.xamarin.com/discussion/comment/180760/#Comment_180760) someone tried a workaround.
Comment 8 blitzillu 2017-10-23 13:51:10 UTC
Sorry guys, this was a false alarm. With


this works and the issue has been indeed fixed. You also need this

using Xamarin.Forms.PlatformConfiguration.iOSSpecific;

so that he recognizes that correctly.

I think this (https://xamarin.uservoice.com/forums/258559-xamarin-forms-suggestions/suggestions/6507788-synchronize-picker-behavior-across-platforms) can be closed.

Related Xamarin Forums post: https://forums.xamarin.com/discussion/20847/picker-selection-event