fix bug with click getting passed to an event behind the popover