arturadib / agility

Javascript MVC for the "write less, do more" programmer
http://agilityjs.com
MIT License
542 stars 70 forks source link

Agility doesn't recognise HTML5 input types #82

Open colinmacc opened 12 years ago

colinmacc commented 12 years ago

If you use HTML5, and declare an input tag of type (say) email, Agility will fail to recognise the tag as an input, and will make it a one-way binding, so changes from user input will not be reflected in the model.

The problem here is in the bindings() function, which I have changed to contain the following:

      // <input type="text">, <input>, and <textarea>: 2-way binding
      else if ($node.is('input, textarea')) {

instead of specifying input[text]

Colin.

garygreen commented 10 years ago

+1 to this. Suprised Agility still hasn't addressed this issue. I'm trying to use the 'number' input type but agility does not set the value on the input but instead as part of the html.