Navigation menu is closed when ui interaction occurs outside it