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

Passing undefined as selector results in events never triggering, breaks other listeners #18

Open
lazd opened this issue Nov 5, 2014 · 0 comments

Comments

@lazd
Copy link

lazd commented Nov 5, 2014

When passing undefined as the selector, the handler is never called (Fiddle):

// ✖ Clicks are NOT handled
Gator(window).on('click', undefined, function() {
    log('Gator got click with undefined selector');
});

However, it is called when selector is not passed at all (Fiddle):

// ✓ Clicks are handled
Gator(window).on('click', function() {
    log('Gator got click with undefined selector');
});

Curiously enough, doing both of the above at the same time results in neither working (Fiddle):

// ✖ Clicks are NOT handled
Gator(window).on('click', undefined, function() {
    log('Gator got click with undefined selector');
});
// ✖ Clicks are NOT handled
Gator(window).on('click', function() {
    log('Gator got click with undefined selector');
});
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

No branches or pull requests

1 participant