Is your feature request related to a problem? Please describe.
Yes. There is a sort of problem.
When someone clicks a link that opens a submenu, the .submenu element toggles open with aria-hidden="false"
However the anchor item actually clicked (above the submenu element) gets no toggled-on class of any sort. It is not easy to style it for when it is open/closed.
I tried using the callbacks:
onSubmenuOpen: () => { //no way of getting to the current submenu opened },
onSubmenuClose: () => {},
However the callbacks are not being passed any parameters. So it is difficult to get the currently opened submenu and do things with it, or with adjacent siblings, like the clicked anchor.
Describe the solution you'd like
Please pass parameters for the callbacks like so:
Line 241 in navigation.js:
this.settings.onSubmenuOpen.call(this, $submenu);
Then I can use it like so:
onSubmenuOpen: (subMenu ) => { subMenu.previousElementSibling.classList.add('something') },
Is your feature request related to a problem? Please describe.
Yes. There is a sort of problem.
When someone clicks a link that opens a submenu, the .submenu element toggles open with aria-hidden="false"
However the anchor item actually clicked (above the submenu element) gets no toggled-on class of any sort. It is not easy to style it for when it is open/closed.
I tried using the callbacks:
onSubmenuOpen: () => { //no way of getting to the current submenu opened },
onSubmenuClose: () => {},
However the callbacks are not being passed any parameters. So it is difficult to get the currently opened submenu and do things with it, or with adjacent siblings, like the clicked anchor.
Describe the solution you'd like
Please pass parameters for the callbacks like so:
Line 241 in navigation.js:
this.settings.onSubmenuOpen.call(this, $submenu);Then I can use it like so:
onSubmenuOpen: (subMenu ) => { subMenu.previousElementSibling.classList.add('something') },