Fix event checking

event.target can be a child of the element and still be a valid
event. If there is no padding between the container and its
children, the child will be the event.target.
Fix:
disregaurd event.target and instead compare event.relatedTarget
to the event's el