marionettejs / backbone.marionette

The Backbone Framework
https://marionettejs.com
Other
7.06k stars 1.26k forks source link

behaviors not unregistering modelEvents/collectionEvents #1186

Closed fschollmeyer closed 10 years ago

fschollmeyer commented 10 years ago

Hi all,

in #1117 the registration of modelEvents and collectionEvents for behaviors was fixed. However the same fix was not applied in the undelegateEvents method:

https://github.com/marionettejs/backbone.marionette/blob/master/src/marionette.behaviors.js#L99-100 I think in those two lines also b should be passed as first arguments.

As a workaround for now, one can call stopListening in an onClose() method in the behavior.

Thanks, Felix

samccone commented 10 years ago

Thanks for pointing this out @fschollmeyer I will resolve this and add tests to prevent this regression.

samccone commented 10 years ago

fixed in 1.8.2