ManuelDeLeon / viewmodel

MVVM for Meteor
https://viewmodel.org
MIT License
205 stars 23 forks source link

Duplicate events firing #218

Closed hluz closed 8 years ago

hluz commented 8 years ago

Having a problem with vm appearing to create multiple identical event listeners on elements. Repro at https://github.com/hluz/vmEvt.git.

To reproduce execute it and just add new Steps. The second time you add a step it fires two click events (causing two Steps to be created). The third time it fires three click events... Also, deleting existing Step(s) will also increase the number of events being fired the next time you add a new Step.

arggh commented 8 years ago

This can also be observed at https://github.com/arggh/viewmodel-click-bind, just pull the latest changes which updates ViewModel from 4.0.6 -> 4.0.9. The amount of events fired increases on every click.

hluz commented 8 years ago

@arggh, my repro is already at 4.0.9...

arggh commented 8 years ago

@hluz That is the repro which resulted in ViewModel updates 4.0.7, 4.0.8 and 4.0.9, so I thought I'd share the finding that the issue appeared somewhere between 4.0.7 and 4.0.9 and can be easily switched to appear or disappear in a repo that the creator of ViewModel maybe didn't yet remove from his computer :)

hluz commented 8 years ago

@arggh Ok. I interpreted that you were saying that 4.0.9 fixes it, since issue #214 (the issue your repro relates to) has been closed...

ManuelDeLeon commented 8 years ago

Fixed on v4.0.10

hluz commented 8 years ago

Many thanks!

ManuelDeLeon commented 8 years ago

Reopen if it doesn't work in v4.0.11

hluz commented 8 years ago

v4.0.11 did not regress it. All fine. Thanks.