added patch to close the navbar when clicking outside of the button