I have a problem with binding a simple login form to a model. The "autofill" event won't be recognized by stickit and therefore the view is not in sync with the model.
The html is pretty straight forward:
<form>
<input id="username" type="text"/>
<input id="password" type="password"/>
</form>
The view will be initialized with an empty model and bound in the render function. Here's an excerpt of the code:
bindings: {
'#username': 'username',
'#password': 'password'
},
...
initialize: function () {
this.model = new Backbone.Model();
}
...
render: function() {
this.stickit();
}
If I retrieve the value by calling $('username').val()
in the initialize
function, I get the proper autofill value.
Does anyone know a solution to this problem?
I didn't create an issue in the git repository, because I'm not sure, whether I'm doing something wrong and autofill works out of the box.
Thanks in advance!
Ago