jquerytools/jquerytools — pull request #560 by duclet (2011-11-11 23:31:57+00:00)
Title: Better check for click outside of an overlay

So what I noticed is that the current check to see if a user clicks outside of an overlay (so it can be closed) doesn't work if the overlay is a direct child of a body and probably some other cases as well. I think this check is better because it takes the overlay, filter it was has to see if the element that was clicked on (event.target) is a descendant of the overlay. If it isn't, then that mean the user had clicked on something outside of the overlay.