While using the website, I noticed that when a user opens the mobile navbar,
it does not close when clicking anywhere outside the menu (i.e., on the body).
Expected behavior:
- When the navbar is open and the user taps outside the menu, the navbar should automatically close.
Actual behavior:
- The navbar stays open even when the user clicks/taps on the body or empty space.
- This results in a poor user experience and blocks the view of the page content.
This fix adds an event listener that closes the navbar when clicking outside,
ensuring proper mobile navigation behavior.
While using the website, I noticed that when a user opens the mobile navbar,
it does not close when clicking anywhere outside the menu (i.e., on the body).
Expected behavior:
Actual behavior:
This fix adds an event listener that closes the navbar when clicking outside,
ensuring proper mobile navigation behavior.