]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commit
fix: fix DropdownMenu body handler check to ignore the element itself 11465/head
authorNicolas Coden <nicolas@ncoden.fr>
Mon, 20 Aug 2018 20:54:18 +0000 (22:54 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Mon, 20 Aug 2018 20:54:18 +0000 (22:54 +0200)
commitf1623b75612db5792eb4eb44b1a76dc1d916c088
treef7616f812137f3dd6994e52bf98a27f506fad41b
parent3aade104619a2fbf758a1dc7b1b8cb24eb76bcd1
fix: fix DropdownMenu body handler check to ignore the element itself

> `andSelf()` is deprecated and should be replaced with `addBack()`
> -- @SassNinja

Also, `andSelf` cannot be used that way. This commit replace it with the opposite approach: checking if the target is the child of the element or the element itself using `closest()`.
js/foundation.dropdownMenu.js