ractivejs/ractive — pull request #1539 by Rich-Harris (2014-12-02 16:40:16+00:00)
Title: on form reset, reset bindings to original values, and update model (#1467)

This is in response to #1467. There are a couple of tricky things around forms - firstly (the issue that was raised), a form's `reset` event doesn't result in the model being reset, even though the inputs are cleared.

Secondly, form widgets that are created programmatically have no initial value - so when the `reset` event happens, the result might not be what you want: http://jsfiddle.net/rich_harris/nt70zue8/

Since Ractive aspires to have as few surprises as possible for people familiar with HTML and its many quirks, I think that both of these issues should be corrected.

This PR doesn't *quite* achieve that, since form widgets that don't have two-way bindings will reset to blank, rather than the desired value (it looks like we need to set `node.defaultValue` for that to work). Also, there are no tests yet. But I thought it'd be worth sharing the progress so far, in case anyone has any feedback on these ideas.

![forms](https://cloud.githubusercontent.com/assets/1162160/5266461/dd3eb9bc-7a17-11e4-9304-63bbff52bbfd.gif)