Bug 30037 - ListView context action should be removed on tab change
Summary: ListView context action should be removed on tab change
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 1.4.3
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Rui Marinho
Depends on:
Reported: 2015-05-13 12:29 UTC by Mike
Modified: 2015-10-07 12:47 UTC (History)
6 users (show)

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

Project setup to demonstrate the issue (22.17 KB, application/x-zip-compressed)
2015-05-13 12:29 UTC, Mike

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 Mike 2015-05-13 12:29:49 UTC
Created attachment 11184 [details]
Project setup to demonstrate the issue

Attached is a project setup to demonstrate the issue.

Steps to reproduce:
1. Long-press a list item in "TAB1" to show the context action "REMOVE".
2. Tap "TAB2".
3. Context action "REMOVE" is visible.

Context action "REMOVE" should be hidden.
Comment 1 Chris King 2015-05-19 17:39:47 UTC
We're currently debating whether our default should be changed. Please feel
free to add a comment as to why you believe the default behavior should be to
close menu items after a page transition.
Comment 2 Mike 2015-05-20 08:55:22 UTC
The context menu is inherently related to the information the user is interacting with.  When that information is no longer available the menu shouldn't be either.
Keeping the menu open between page transitions hides ToolbarItems defined in other tabs.

Imagine this use case that uses a TabbedPage.  Each tab in the page displays information related to a person.  Tab1 is a list of friends.  Tab2 is a list of enemies.  A ToolbarItem named "Edit" exists on each tab to allow the user to edit the person's personal information (name, email, phone, etc).  When a user long-presses a friend in Tab1 a context menu appears allowing them to "Edit" the friends personal information (name, email, phone, etc).  If the user immediately switches tabs and chooses "Edit" they'll be editing the friend's information instead of editing the person's information.
Comment 3 Anonymous 2015-06-09 15:27:33 UTC
I would just like to second Mike's reasoning. It makes sense that a context menu is bound to a certain view of information and should not remain visible when a new view is displayed. 

The case Mike mentioned above would create a lot of confusion for users and testers alike. I would further argue that it does not match iOS behavior. I cannot access the context actions for one tab page from another tab page on iOS. Why should Android behave differently?

I could somewhat understand if the context menu remained active ONLY on the tab page that it was activated from. That would be acceptable behavior in my opinion.
Comment 4 Jason Smith [MSFT] 2015-09-02 02:05:44 UTC
Should be fixed in 1.5.1-pre1
Comment 5 Parmendra Kumar 2015-10-07 12:47:45 UTC
I have checked this issue with Xamarin.Forms 1.5.1-pre1 and its working fine.

Hence closing this issue.