Prevent event bubbling on close