powmedia/backbone-forms — pull request #147 by drd (2012-10-15 19:52:33+00:00)
Title: Feedback wanted: generic field:focus/change/blur and field:render/show events

### The problem:

I want to be able to update the entire form when any individual field is focused/blurred/changed and also to be able to configure and register event handlers on individual fields as they are rendered

### The solution:

I've added generic field:focus, field:change, and field:blur events which get triggered when any editor is focused, changed or blurred. Also, I've added field:render and field:show. I've added tests for these events.

### The quandary:

Unlike existing bbf events which bubble the editor, these events pass the field as the second argument to handlers. I don't like this inconsistency, but editors don't have a reference to the field and I needed to style the field in response to these events. There are a few solutions:

- add a field reference to editors
- add the editor as the 2nd argument, and the field as a third argument
- or i can just look up the field in the form based on the name, and have these events have the same signature as the others