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

Trigger becameInactive event when active spy destroyed. #152

Merged
merged 1 commit into from
Oct 13, 2015

Conversation

pkaminski
Copy link
Contributor

When a spied-upon element is destroyed, and that spy is currently active, trigger the duScrollspy:becameInactive event. This doesn't matter if the client code is just using the class for styling, but if it's actually making use of the becameActive/becameInactive events then the client will end up in the wrong state. This also maintains symmetry with addSpy, which forces the handler to run (and possibly trigger becameActive) as soon as the spy is added.

Review on Reviewable

@oblador
Copy link
Owner

oblador commented Oct 13, 2015

Looks great, thanks!

oblador added a commit that referenced this pull request Oct 13, 2015
Trigger becameInactive event when active spy destroyed.
@oblador oblador merged commit 565ab84 into oblador:master Oct 13, 2015
@pkaminski pkaminski deleted the inactive-on-destroy branch December 5, 2015 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants