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 missed off(), which is not recorded in $.cache #1685

Closed
wants to merge 1 commit into from

Conversation

grimalschi
Copy link
Contributor

Some events are not disabled, and check in teardown does not find them

@dmethvin
Copy link
Member

dmethvin commented Oct 8, 2014

Interesting! Did you find these with a code analysis tool?

@grimalschi
Copy link
Contributor Author

No, i just write plugin for easy work with events, and for testing i have took these tests.

I have created monkey patches(https://github.com/grimalschi/jquery-behavior/blob/master/test/test.js#L8) for all jQuery event function - on, one, off trigger, triggerHandler and others.

So I intercept function calls and directing them to plugin, which does the same as on() and off() functions, but with saving all information about events, adding the ability to put events on pause, keep logs of calls events, filter events for all the information about them, and disable all the events of one function .

I added in the teardown test(https://github.com/grimalschi/jquery-behavior/blob/master/test/test.js#L21), which alerts that if there are any active events, and this test has allowed me to find some missed events.

Plugin development is not over yet, but now all the tests pass :)

Sorry for bad english, i am russian.

@dmethvin
Copy link
Member

dmethvin commented Dec 3, 2014

@grimalschi can you sign our CLA? This is trivial enough that I could land it under my name but I'd prefer to give you credit. Thanks! http://contribute.jquery.org/CLA

@grimalschi
Copy link
Contributor Author

@dmethvin done!

dmethvin pushed a commit that referenced this pull request Dec 8, 2014
@dmethvin dmethvin closed this in 4467ed6 Dec 8, 2014
@dmethvin dmethvin added this to the 3.0.0 milestone Dec 8, 2014
@dmethvin dmethvin added the Event label Dec 8, 2014
markelog pushed a commit that referenced this pull request Nov 10, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants