Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #6694 - datepicker does not fire change event in IE8 #84

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
2 participants
@tobiasbrunner
Copy link
Contributor

commented Dec 31, 2010

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

Datepicker: only set the focus explicitly if it is not already on the…
… target field. Fixed #6694 – datepicker does not fire change event in IE8


jQuery stores the current content of a field whenever it gets the focus. Since the fixed function is also called for KeyUp events the change event is not triggered anymore when the input looses focus.
@scottgonzalez

This comment has been minimized.

Copy link
Member

commented Feb 3, 2011

Filed a bug against jQuery core: http://bugs.jquery.com/ticket/8157

@scottgonzalez

This comment has been minimized.

Copy link
Member

commented Feb 3, 2011

Thanks, landed in 39cf7d5.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.