dimsemenov/Magnific-Popup — pull request #437 by jefferyto (2014-04-15 18:07:56+00:00)
Title: Check ancestors when button is clicked

In Chrome, if a user clicks on a `` with child elements, the click target is the child element and not the `` (if the user clicked precisely on the child element). See http://jsfiddle.net/jefferyto/MDCHj/ for a demo (try clicking on both the green `` as well as the red inner `` element).

This change checks the click target as well as its ancestors, when testing for classes. (A demo with this change is at http://jsfiddle.net/jefferyto/Jdg4E/2/)