github / details-menu-element

A menu opened with <details>.

Home Page:https://github.github.io/details-menu-element/examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The events are emitted 3 times using `menuitemradio`

ocarreterom opened this issue · comments

The events are emitted 3 times using role="menuitemradio", when using other roles only single event is emitted.

Captura de pantalla 2019-05-09 a las 13 00 47

I think the problem is in this line:

: target.closest('[role="menuitem"], [role="menuitemradio"]')

[role="menuitemradio"] is interacting with both change and click events from <details>.

This is a problem since the first time details-menu-selected is fired, the radio button is still unchecked.