PolymerElements / paper-dropdown-menu

A Material Design browser select element
https://www.webcomponents.org/element/PolymerElements/paper-dropdown-menu
61 stars 107 forks source link

Menu within a dialog should not change focus when closing #151

Closed rictic closed 8 years ago

rictic commented 8 years ago

Moved from an issue that was filed internally:

Observed: input element is initially correctly focused, but 1/2 second later the focus is moved to the dropdown menu. This is because when the dropdown menu finishes its closing animation it calls Polymer.IronOverlayBehaviorImpl._applyFocus.apply(this, arguments); This shifts the focused element inside the dialog.

valdrinkoshi commented 8 years ago

This has been fixed since overlays now keep track of what's the focused child, and restore the focus there (in your example, on the input) https://jsbin.com/laforaz/3/edit?html,output