googlearchive / paper-menu

A Material Design menu
https://www.webcomponents.org/element/PolymerElements/paper-menu
27 stars 48 forks source link

Paper menu doesn't close when clicking selected option #100

Open lkovaleva opened 8 years ago

lkovaleva commented 8 years ago

Description

When a user clicks on an already selected menu item in paper-menu, the menu does not react to the click. I would expect such a click to be a no-op but for the menu to close. As of right now, user has to click outside of the menu to close it without changing the selection.

Expected outcome

The menu should close on click, even when it's the same option as was already selected on open.

Actual outcome

Nothing happens on clicking already selected item, the menu remains open. To close the menu, one must click another option, or click outside of the menu, which is not very intuitive.

Live Demo

https://elements.polymer-project.org/elements/paper-dropdown-menu?view=demo:demo/index.html&active=paper-dropdown-menu

Steps to reproduce

  1. Open the first menu and select "brontosaurus" (menu item is selected and menu is closed).
  2. Open the same menu and select "brontosaurus" again.

    Browsers Affected

Only tested in Chrome

dhrytsenko commented 8 years ago

I have the same problem. Now I have a list and I change the items in it and remains after 1 item user can't to choose it.

ekoleszar commented 7 years ago

It works for me...

88mary256 commented 7 years ago

I have the same problem

timoteoponce commented 7 years ago

Had the same problem, by adding the property close-on-activate it solved it.