Only close navigation when mobile menu is visible.