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

Unable to programmatically test "Enter" key behavior. #175

Open freshp86 opened 8 years ago

freshp86 commented 8 years ago

I am trying to write a simple test where I simulate an "Enter" keystroke on a menu item and then I assert that the current selection of the menu has changed. Even though a real "Enter" keystroke works, the programmatic one does not do anything, see minimal repro case at https://jsfiddle.net/j4rfjasf/9/.

I tried several variations (for example opening the menu before firing the event, as well as firing different types of events, keyup, keydown, keypress), without success. Any help is appreciated.