You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I only want the manual event binding to be invoked when directly changing the checkbox via a click. However, I do want the the bindings hash to sync the state of the checkbox with the model.
The text was updated successfully, but these errors were encountered:
@mehcode - I'm not quite sure what the problem or use case is. The last couple of sentences read: "I want the manual event binding to be invoked ... I want the bindings hash to sync the state." That should be the case.
The bindings hash is working great. All events surrounding it are good.
However; the additional event that is bound in the events hash is not being fired. After investigating the source I discovered that you're overwriting this.events with events generated from this.bindings. My suggestion is to use view.$el.on instead so this.events works and is not overwritten by the events from this.bindings.
Ah, that's a bug. I fixed this by namespacing the event - I would like for Backbone to handle undelegating so that binding events can be released in the life cycle of other events. Let me know if you spot something wrong with that idea. Thanks, again!
Looking at https://github.com/NYTimes/backbone.stickit/blob/master/backbone.stickit.js#L115-L136; I notice you're throwing events into
this.events
and then re-invokingthis.delegateEvents
.Can we change that to invoking
this.$el.on
and then (onunstickit
) callingthis.$el.off
?The main problem is as follows:
I only want the manual event binding to be invoked when directly changing the checkbox via a click. However, I do want the the bindings hash to sync the state of the checkbox with the model.
The text was updated successfully, but these errors were encountered: