material-design-lite icon indicating copy to clipboard operation
material-design-lite copied to clipboard

Is there an way to prevent the menu closing when an item is clicked

Open acollazomayer opened this issue 6 years ago • 1 comments
trafficstars

Is there a way to prevent the closing of the mdl-menu once the mdl-menu__item is clicked I already tried adding preventDefault and stopPropagation and I did not manage to solve this.

Thank You

acollazomayer avatar Dec 14 '18 19:12 acollazomayer

you can remove the click event handler from a menu

document.querySelector('.mdl-menu__item').removeEventListener('click', document.querySelector('.mdl-menu').MaterialMenu.boundItemClick_)

aburai avatar Dec 16 '18 16:12 aburai