Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Commit

Permalink
fix for iOS menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
maykar committed Jun 30, 2020
1 parent 674c61f commit ccf0c09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/build-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ export class CustomHeader {

tapOrClick(listenElement, clickElement) {
listenElement.setAttribute('onClick', ' ');
if (clickElement.nodeName === 'MWC-LIST-ITEM') {
listenElement.addEventListener('tap', () => {
clickElement.dispatchEvent(new MouseEvent('tap'));
});
}
listenElement.addEventListener('click', () => {
if (clickElement.nodeName === 'MWC-LIST-ITEM') {
clickElement.click();
Expand Down

0 comments on commit ccf0c09

Please sign in to comment.