Skip to content

Commit

Permalink
Fix in logic for handling exclusive namespace testing. Fixes #6048.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeresig committed Feb 8, 2010
1 parent d743899 commit 75bb2d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/event.js
Expand Up @@ -362,7 +362,7 @@ jQuery.event = {
event.currentTarget = this; event.currentTarget = this;


// Namespaced event handlers // Namespaced event handlers
all = event.type.indexOf(".") < 0; all = event.type.indexOf(".") < 0 && !event.exclusive;


if ( !all ) { if ( !all ) {
namespaces = event.type.split("."); namespaces = event.type.split(".");
Expand All @@ -380,7 +380,7 @@ jQuery.event = {
var handleObj = handlers[ j ]; var handleObj = handlers[ j ];


// Filter the functions by class // Filter the functions by class
if ( (all && !event.exclusive) || namespace.test( handleObj.namespace ) ) { if ( all || namespace.test( handleObj.namespace ) ) {
// Pass in a reference to the handler function itself // Pass in a reference to the handler function itself
// So that we can later remove it // So that we can later remove it
event.handler = handleObj.handler; event.handler = handleObj.handler;
Expand Down

4 comments on commit 75bb2d6

@irae
Copy link
Contributor

@irae irae commented on 75bb2d6 Feb 9, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xD

This was a good one! I've spent about 40 minutes trying to solve this issue as a bug (before posting the issue in trac).
Turns out it was a test case problem.

John, isn't a bit dangerous changing a test that passed in previous releases?

@jeresig
Copy link
Member Author

@jeresig jeresig commented on 75bb2d6 Feb 9, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@irae: I see that your posts aren't coming through. You should file a Github support ticket, sometimes people get put in the spam filter accidentally and need to be freed.

@jeresig
Copy link
Member Author

@jeresig jeresig commented on 75bb2d6 Feb 9, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@irae: I'm not sure what you're referring to with regards to the changing of tests - can you expand on that?

@irae
Copy link
Contributor

@irae irae commented on 75bb2d6 Feb 9, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind!
My bad! I've misread the commit message.

I've missed the src/event.js filename and I was under the impression that you've changed test/unit/event.js
Sorry about that! =)

Please sign in to comment.