I created an interaction for the Hamburger Menu, where upon clicking on a menu item, the menu collapses.
When I open and close the menu using the hamburger icon, it takes place seamlessly.
But the problem arises when I click on a menu item, which scrolls to the section and collapses the menu. But if I click on the hamburger icon again, it replays the animation of the menu collapsing quickly. How do I fix this?
I figured out the problem. The reason the glitch happens is because the behavior on “second click” for the hamburger menu icon is to close the menu (so that when I first click the icon, it opens, when I click on the icon again, it closes)
But the behavior I have set when I click on a menu item, is for the menu to close again. Hence, the menu has closed due to first click on a menu item, and not second click on the hamburger icon again.
So the subsequent click on the hamburger icon to open it, plays the “second click” animation.
Now that I have figured this out, can you help me with how I can solve this problem?