can/event delegate/undelegate aren't using the correct scope #1039

Closed
andykant opened this Issue Jun 2, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@andykant
Contributor

andykant commented Jun 2, 2014

The delegate and undelegate method aliases in can/event aren't currently passing the proper scope when adding/removing event listeners.

Currently:

delegate: function(selector, event, handler) {
  return can.addEvent.call(event, handler);
},

Should be:

delegate: function(selector, event, handler) {
  return can.addEvent.call(this, event, handler);
},
@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Jun 10, 2014

Contributor

Closed via #1055

Contributor

daffl commented Jun 10, 2014

Closed via #1055

@daffl daffl closed this Jun 10, 2014

@andykant andykant removed their assignment Oct 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment