]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commit
Avoid reveal modal closing upon click of an element not in the DOM 9146/head
authorardeshireshghi <ardi.eshghi@gmail.com>
Wed, 31 Aug 2016 08:51:07 +0000 (09:51 +0100)
committerGitHub <noreply@github.com>
Wed, 31 Aug 2016 08:51:07 +0000 (09:51 +0100)
commit5cc02a8f6aa92aeb0bc8cde20fcfa9ee61c185ae
treeb27081778f1b14aac2449fafacaecd5574e89d38
parentc14a44ea11248933b9f71305bce3db95427a7bb1
Avoid reveal modal closing upon click of an element not in the DOM

Added check to make sure e.target is still in the DOM. I came across a bug when I created a google map canvas inside reveal modal, whereby upon closing the info popup on a map marker, the entire reveal modal gets closed. This is because when the overlay click handler is invoked, Google code has already removed the e.target  element and the overlay handler only gets a ghost element and can not find it in the modal element
js/foundation.reveal.js