thoughtbot/capybara-webkit — pull request #270 by whatcould (2012-02-12 18:29:52+00:00)
Title: Add support for HTML(5) input event

The input event is like onchange, but on text fields, it is fired as soon as the value of the field changes, not when the field is blurred. It is a more appropriate event than 'keydown' or 'keyup', which behave unpredictably with paste events, held-down keys, etc.

Support is a little problematic, but it is supported well by Webkit and Firefox, so it seems useful to add here.

===

I'm using this event in my app, and it works great in Webkit and Firefox, but capybara-webkit doesn't fire it, so tests break.

More details:

See the spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#event-input-input

The best discussion on cross-browser implementation is here: http://bugs.jquery.com/ticket/9121 -- basically, you can detect browsers, and on unsupported browsers (basically IE), use the old keyup/keydown/change events in the old hacky way.