derickbailey/backbone.modelbinding — Issue #34: registerElementBinding() not called for <div> elements with data-bind
Author: margieroginski
Created: 2011-10-25 00:46:06+00:00
State: open

I am using the databind convention. For an html element that is not an (in my case it is a

), I find that if I update my model, it sets the corresponding element field, but if I trigger a change on the element, it does not update my model.

When the html element is an input, it seems to get handled correctly becase both registerModelBinding() and registerElementBinding() get called (I believe we fall into the code in StandardBinding in this case). However, when the html element is a

, end up in the DataBindBinding code and in this code, at around line 427 I see a call to registerModelBinding(), but no call to registerElementBinding().

Is this a real bug or am I misunderstanding how to use the API? Seems like a very nice package, thank you for making it available.

Margie