Touch events close dropdown but click events do not.
Description
In a paper-menu-button where the dropdown-content is a div containing various elements (not selectables), clicking around in the dropdown does not close it when on the computer (good). If I open dev tools, simulate a phone, and touch/tap anywhere in the dropdown-content, it closes.
Expected outcome
Consistent behavior, preferably not closing until I click outside of the dropdown.
Actual outcome
Mouse: click inside without close. Touch: click inside causes close.
Browsers Affected
- [x ] Chrome
I have this same issue with the following markup:
<paper-menu-button id="menu"
dynamic-align
ignore-select
close-on-activate="false"
restore-focus-on-close
>
<paper-icon-button id="button" class="dropdown-trigger"></paper-icon-button>
<iron-pages id="dropdown"
class="dropdown-content"
selected="[[page]]"
attr-for-selected="id"
fallback-selection="auth"
role="main">
<eve-auth-ui id="auth" auth="[[auth]]"></eve-auth-ui>
<eve-profile id="profile" auth="[[auth]]"></eve-profile>
</iron-pages>
</paper-menu-button>
Note that even with ignore-select and close-on-activate="false", tap events close the dropdown.
Workaround
Add on-tap="_handleTap" to the dropdown element (in my case, iron-pages#dropdown). The tap handler should do nothing.
_handleTap: function (e) {/*HACK: Prevent dropdown from closing on touch-events*/},