Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unwanted focusing of menu items #74

Open
mikaelharsjo opened this issue Aug 19, 2016 · 1 comment
Open

Unwanted focusing of menu items #74

mikaelharsjo opened this issue Aug 19, 2016 · 1 comment

Comments

@mikaelharsjo
Copy link

Description

      <paper-menu-button>
        <paper-icon-button icon="settings" class="dropdown-trigger"></paper-icon-button>
        <paper-menu>
          <paper-item>About</paper-item>
          <paper-item>Help</paper-item>
        </paper-menu>
      </paper-menu-button>

When the menu is opened via click and nothing is selected the first item is always focused.
In my opinion this is rarely how dropdown-menus work.
Just check https://material.google.com/components/buttons.html#buttons-dropdown-buttons or click any menu in Chrome. I would expect nothing to be focused and when you arrow down the first gets focus.

Can this at least be an option, like auto-focus or something?

@soygul
Copy link

soygul commented Sep 28, 2016

Seems like this was a deliberate choice: https://github.com/PolymerElements/iron-menu-behavior/blob/master/iron-menu-behavior.html#L301

// focus the selected item when the menu receives focus, or the first item
// if no item is selected
var selectedItem = this.multi ? (this.selectedItems && this.selectedItems[0]) : this.selectedItem;

Pretty much old school Norton Commander like behavior. Not sure if it's valid for webapps though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants