HenrikJoreteg / human-view

A smart base view for Backbone apps, to make it easy to bind collections and properties to the DOM.
33 stars 6 forks source link

events collection binding does not target view.$el #20

Closed CNovakCAA closed 10 years ago

CNovakCAA commented 10 years ago

Using the events collection to bind events to the view actually binds the events to any element in the DOM that matches the selector passed in.

Instead, the events should bind only to children of the view's $el.

HenrikJoreteg commented 10 years ago

Can you explain what you mean by "using the events collection to bind events" and describe the problem it caused?

HenrikJoreteg commented 10 years ago

Human-View simply uses backbone's delegate events method.

See here: https://github.com/jashkenas/backbone/blob/master/backbone.js#L1114

It's always this.$el.on(

CNovakCAA commented 10 years ago

I can't reproduce my own error. Not sure at this point. Closing this issue until I can confirm this exists.