Material-design-lite: Is there an way to prevent the menu closing when an item is clicked

Created on 14 Dec 2018  路  1Comment  路  Source: google/material-design-lite

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

Most helpful comment

you can remove the click event handler from a menu

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

>All comments

you can remove the click event handler from a menu

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DeepSwami picture DeepSwami  路  3Comments

rafaelcorreiapoli picture rafaelcorreiapoli  路  3Comments

traviskaufman picture traviskaufman  路  5Comments

lgg picture lgg  路  3Comments

tleunen picture tleunen  路  5Comments