When you click the button to open a menu, that works as intended. But when you click the same button to close a menu, the menu will close briefly (its display is set to none), but then it immediately re-opens again. I've posted a gif below to illustrate the issue better:
This is typically not the intended behavior of such menus. When the menu is open, and you click the button, the menu should close; it shouldn't re-open.
When you click the button to open a menu, that works as intended. But when you click the same button to close a menu, the menu will close briefly (its
display
is set tonone
), but then it immediately re-opens again. I've posted a gif below to illustrate the issue better:https://makeagif.com/i/Ewp3vx
This is typically not the intended behavior of such menus. When the menu is open, and you click the button, the menu should close; it shouldn't re-open.