popover being closed if clicked outside of it