]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commit
fix: prevent removing all listeners by checking them before unbinding 11366/head
authorNicolas Coden <nicolas@ncoden.fr>
Sat, 30 Jun 2018 21:16:32 +0000 (23:16 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Sat, 30 Jun 2018 21:25:03 +0000 (23:25 +0200)
commit2c8485f32252b29d8c932d807591a2c9e0cf616e
treee9279c6ba4a5f15118c452ba160cb6e02f58ffe4
parent07696c3e89e672853e51cb1afff4f4ff0fafb8e2
fix: prevent removing all listeners by checking them before unbinding

$(...).off(undefined) removes all the attached event listeners, including those outside Foundation of unrelated to the issue.

This commit fixes #11360 and probably others issues by checking for variables expected to be listeners names before using it to remove the listeners.

[This fix is compatible with v6.5]

Closes https://github.com/zurb/foundation-sites/issues/11360
js/foundation.magellan.js
js/foundation.offcanvas.js
js/foundation.reveal.js
js/foundation.sticky.js
js/foundation.tabs.js