Fix for #6694 - datepicker does not fire change event in IE8 #84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a fix for a problem that is actually caused by changes introduced with jQuery 1.4.3 (it works in 1.4.2 which does not have line [1]). Thus, this might affect other plugins/applications too and it would probably be better to fix it in jQuery directly. The problem occurs when calling focus() for an input field that already has the focus and after it got changed (e.g. from a keyup event). Whenever a field gets the focus jQuery stores the current content of that field and then later triggers the change event only if the content has changed since it got the focus (only if . So calling focus() explicitly might not be a good idea, at least, not if the focus is already on the field, which is what this patch prevents. Browsers that do not require the change event delegation are not affected by this (all but IE?).
[1] https://github.com/jquery/jquery/blob/master/src/event.js#L866