New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 657970 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

MD Settings: Action menus

Project Member Reported by michae...@chromium.org, Oct 20 2016

Issue description

Overflow menus used for list items MD Settings tend to have the following bug:

1. Open two Settings pages side by side.
2. Open the overflow menu for the same list item in both windows.
3. In one window, perform an action from the menu (e.g. Remove)

Expected: The menu closes on both pages.
Actual: The menu stays open on the other page, so it's now a "dangling" menu. If there is a different list item at that spot now, the menu *may* refer to that item.

Examples: Manage search engines, On startup, Languages, ...

MD History does not have this issue.
 

Comment 1 by dpa...@chromium.org, Oct 20 2016

Labels: Proj-MaterialDesign-WebUI

Comment 2 by dpa...@chromium.org, Oct 20 2016

I think the easiest solution to implement is to add a Window 'blur' listener, and simply close the menu when it loses focus. This way the user will not be able to have to action menus open on two different windows at the same time.

Seems reasonable since it does not actually remove any functionality, while fixing a corner case. Thoughts?

Comment 3 by dpa...@chromium.org, Oct 20 2016

Cc: dbeam@chromium.org

Comment 4 by dbeam@chromium.org, Oct 25 2016

dpapad@: can we figure out a way to hide an associated action menu if the anchor element is removed?  would that fix our issues here?

Comment 5 by dpa...@chromium.org, Oct 25 2016

First, let me clarify that this bug applies only to cases where we have 1 shared action menu for N items. For the 1-1 case, the action menu itself is a child of the item, so when the item is removed, the action menu is also removed.

So for the 1-N case, yes, if we somehow could get notified that the anchor element got removed, and close the menu, it would fix the issue.

Michael mentioned at comment#1 that MD history does not have this issue. I am wondering how do they handle this, given that AFAIK they are using cr-shared-menu, which falls under the 1-N case.

Comment 7 by dbeam@chromium.org, Oct 25 2016

though I don't think it'd be hard to do something like:

onDotsTap_: function() {
  this.actionMenu_ = ... create action menu ...
},

detached: function() {
  if (this.actionMenu_)
    this.actionMenu_.close();
},

Comment 8 by dpa...@chromium.org, Oct 25 2016

Well, it would have to be more sophisticated than this. If the menu has been assigned to a different list item already, detached() should do nothing. Otherwise the menu might be accidentally closed when an unrelated item is removed.
Labels: Hotlist-MD-Settings-General
Owner: dpa...@chromium.org
Status: Assigned (was: Untriaged)
I'm also happy to hide on blur. It appears that native dropdowns work that way.
Cc: tsergeant@chromium.org
hiding on window blur seems reasonable and easy -- cr-action-menu already closes on window resize.

It doesn't address the case where an item is removed without user action, like if syncing settings happens to remove a search engine or something like that. But I doubt that's likely to happen.
Owner: ----
Status: Available (was: Assigned)
Marking bugs (mostly lower priority ones) that I am unlikely to get to soon as Available.
Project Member

Comment 12 by sheriffbot@chromium.org, Oct 25

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: WontFix (was: Untriaged)
I am closing this bug. It refers to a corner case that has not come up otherwise, and therefore it's not clear it is worth spending time on it.

Sign in to add a comment