Bug 27213 - TableView - context actions switched to another cell after table reload.
Summary: TableView - context actions switched to another cell after table reload.
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.4
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-02-19 09:21 UTC by Maciej Czechowski
Modified: 2015-03-05 04:31 UTC (History)
8 users (show)

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


Attachments
Sample solution with bug. (208.09 KB, application/zip)
2015-02-19 09:21 UTC, Maciej Czechowski
Details


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:
Status:
VERIFIED FIXED

Description Maciej Czechowski 2015-02-19 09:21:31 UTC
Created attachment 9921 [details]
Sample solution with bug.

Tested on iOS.
1. Create TableView and add two cell to it
2. Attach a delete context action to each cell, with a command that deletes cell a given index
3. Within the delete command force table reload by reassigning its source
4. Run the app
5. Swipe the first cell and push Delete

The context actions are not hidden. First cell is removed, but the context view is still visible and moved to the SECOND cell (visible when manually closing action).
This can be worked around by postponing table reload for ~200ms - possibly it is some kind of race condition.

The attachment has the sample solution that presents the problem.
Comment 1 Naqeeb 2015-02-19 11:03:13 UTC
I have checked this issue with the help of attached sample and able to reproduce successfully. I have followed steps given below

1. Open attached project in XS.
2. Deploy on simulator.
3. I observe that here is two cell. First is cell 1 and Second is cell 2
4. Delete the cell 1.

I observed that cell 2 is invisible automatically.  But I get cell 2, when we move to cell 2. Same  as screencast: http://www.screencast.com/t/2tcmTcXgQNc

Ide log: https://gist.github.com/Mohit-Kheterpal/c2f25ab6c079f7cd9c66
Application Output: https://gist.github.com/Mohit-Kheterpal/972383233a641fc869bc
System log for simulator: https://gist.github.com/Mohit-Kheterpal/cd9592ddc46ec8e3c230

Environment info:
=== Xamarin Studio ===

Version 5.7.2 (build 2)
Installation UUID: 3dbf10c4-ed30-4e55-8a8b-1704777c7b5f
Runtime:
	Mono 3.12.0 ((detached/de2f33f)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000076

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.iOS ===

Version: 8.6.2.19 (Business Edition)
Hash: d508c8e
Branch: 
Build date: 2015-02-15 22:17:46-0500

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/apprpject/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		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)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.Mac ===

Version: 1.12.0.8 (Business Edition)

=== Build Information ===

Release ID: 507020002
Git revision: d6231e6325f274cea59da478410f561312c5b401
Build date: 2015-02-17 19:04:38-05
Xamarin addins: b212fd66838b0d6e2435966e541e66ab9c988698

=== Operating System ===

Mac OS X 10.8.5
Darwin localhost 12.5.0 Darwin Kernel Version 12.5.0
    Sun Sep 29 13:33:47 PDT 2013
    root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
Comment 2 Maciej Czechowski 2015-02-19 11:13:08 UTC
OK, some additional info - it behaves  differently on ios8
On ios7 (one seen in screencast) the context disappears, yet then tapping on the cell2 Delete afterwards does not have any effect (Command is not called)
On ios8 it behaves as stated in original report.
Comment 3 Rui Marinho 2015-03-03 12:21:20 UTC
This is fixed in 1.4-pre1

Take in attention that when you delete again, if the parameter for the command is 1 you will have a Exception since there are only 1 cell not 2
Comment 4 Naqeeb 2015-03-05 04:31:06 UTC
I have checked this issue with Xamarin.Forms 1.4.0.6336-pre 1 and it's working fine.

Hence closing this issue.

Screencast: http://www.screencast.com/t/rBqHgpTqdRj7

Environment info:
=== Xamarin Studio ===

Version 5.7.2 (build 8)
Installation UUID: 3dbf10c4-ed30-4e55-8a8b-1704777c7b5f
Runtime:
	Mono 3.12.0 ((detached/6235202)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000080

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.iOS ===

Version: 8.6.3.8 (Business Edition)
Hash: 9dd40fb
Branch: 
Build date: 2015-03-04 15:57:52-0500

=== Xamarin.Android ===

Version: 5.1.0.7 (Business Edition)
Android SDK: /Users/apprpject/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		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)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.Mac ===

Version: 1.12.0.11 (Business Edition)

=== Build Information ===

Release ID: 507020008
Git revision: 64a4266f0a82f7558472383d8ae66a526b3b881d
Build date: 2015-02-25 11:22:12-05
Xamarin addins: 1cb443ca2dddd9933d748e035560f06cf9c246bd

=== Operating System ===

Mac OS X 10.8.5
Darwin localhost 12.5.0 Darwin Kernel Version 12.5.0
    Sun Sep 29 13:33:47 PDT 2013
    root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64