The original commit:
which Fixes #5884, but the code is redundant.
if jQuery.contains( elem, related ) then 'related' can't push in the "elems" that fire live mouseenter/leave event. and the variable "related " is not used.
so just " && !jQuery.contains( elem, related ) "
Edited src/event.js via GitHub
The contains call is only necessary for mouseenter/mouseleave events.