Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent removing all listeners by checking them before unbinding #11366

Merged

Conversation

ncoden
Copy link
Contributor

@ncoden ncoden commented Jun 30, 2018

Description

$(...).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.

Closes #11360

Changes

  • Check if variables are a listener name befaore removing the listener in Magellan, OffCanvas, Reveal, Sticky and Tabs

Types of changes

  • Documentation
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing
    functionality to change)

Checklist (all required):

  • I have read and follow the CONTRIBUTING document.
  • There are no other pull request similar to this one.
  • The pull request title is descriptive.
  • The template is fully and correctly filled.
  • The pull request targets the right branch (develop or support/*).
  • My commits are correctly titled and contain all relevant information.
  • My code follows the code style of this project.
  • I have updated the documentation accordingly to my changes (if relevant).
  • I have added tests to cover my changes (if relevant).
  • All new and existing tests passed.

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

This commit fixes foundation#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 foundation#11360
@ncoden ncoden merged commit ee8be18 into foundation:develop Jul 2, 2018
ncoden added a commit to ncoden/foundation-sites that referenced this pull request Jul 6, 2018
…ore-unbind-11360 for v6.5.0

2c8485f fix: prevent removing all listeners by checking them before unbinding

Signed-off-by: Nicolas Coden <[email protected]>
ncoden added a commit to ncoden/foundation-sites that referenced this pull request Jul 8, 2018
…ore-unbind-11360 for v6.5.0

2c8485f fix: prevent removing all listeners by checking them before unbinding

Signed-off-by: Nicolas Coden <[email protected]>
@ncoden ncoden mentioned this pull request Jul 8, 2018
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6.5.0 RC1: responsive accordion tabs do not work anymore
2 participants