jquerytools/jquerytools — pull request #825 by marcandre (2012-07-31 04:38:29+00:00)
Title: Fix bubbling

I'm relying on `$(document).on('change', 'input.foo')` for form validation and it is not triggered by dateInput.js because of two bugs:

1) I don't know why, but the event triggering the date change is reused. The `target` is still set to the day I clicked on, so the event doesn't bubble up properly. My patch disregards the event passed, but if you want you could instead `delete e.target` before firing the event.

I'm no expert in JS, but I find the idea of reusing events (for different types and after they have been fired!) really ugly. Here it's reused after `beforeChange`. What if bubbling is turned off? What if, I don't know, anything was modified?

2) Clearing the date doesn't fire anything.