Fix 'change' event propagation #828

wants to merge 2 commits into


None yet
1 participant

I'm relying on $(document).on('change', '') 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 won't be caught properly. My patch disregards the event passed, but if you want you could instead delete 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?

  1. Clearing the date doesn't fire anything.

@marcandre marcandre referenced this pull request Jul 31, 2012


Fix bubbling #825


This comment has been minimized.

Show comment Hide comment

marcandre Oct 4, 2012



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment