Skip to content

Trigger becameInactive event when active spy destroyed.#152

Merged
oblador merged 1 commit into
oblador:masterfrom
Reviewable:inactive-on-destroy
Oct 13, 2015
Merged

Trigger becameInactive event when active spy destroyed.#152
oblador merged 1 commit into
oblador:masterfrom
Reviewable:inactive-on-destroy

Conversation

@pkaminski
Copy link
Copy Markdown
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
Copy Markdown
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