Skip to main content

Bug Tracker

Side navigation

#7630 closed bug (invalid)

Opened November 24, 2010 10:54PM UTC

Closed November 24, 2010 11:07PM UTC

datepicker does not fire change event in IE8

Reported by: cmcnulty Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
Description

When using IE8 and entering a date using the keyboard the change event isn't raised when the input loses focus if the datepicker was visible whilst entering the date.

Steps to reproduce:

1. Use IE 8

2. Focus the input field (datepicker should show).

3. Enter the date "10/10/2010" in to the first input field (do not close the datepicker).

4. Tab to the next input field.

Result:

The page still shows "Date: none"

Expected Result:

The page should show "Date: 10/10/2010"

http://www.jsfiddle.net/gUc5c/8/

Notes:

The field we are interested in is "Date:", "Other:" is just for verification that change and tabbing is working correctly.

The error seems to be coming from the focus changing during typing in the date box whilst the picker is visible. This happens when the user starts entering the year part of the date.

Stack trace when "_change_data" is changed due to focus event.


   1. jQuery.js:1174 (data == '10/10/2')
   2. jQuery.js:2636 (beforeactivate)
   3. jQuery.js:2260 (event.type == 'focus')
   4. ...
   5. jQuery-ui.js:7768 (_updateDatepicker, inst.input.focus())
   6. jQuery-ui.js:7651 (_doKeyUp)

Html:

   1. <div>
   2.     <input id="a1" type="text">
   3.     Date: <span id="a2">none</span>
   4. </div>
   5.

   6. <div>
   7.     <input id="b1" type="text">
   8.      Other: <span id="b2">none</span>
   9. </div>

Javascript:

   1. $(function () {  
   2.     $('#a1').datepicker ({
   3.         showOn: 'focus',
   4.         buttonText: 'clickme'
   5.     }).change (function () {
   6.         $('#a2').text ($(this).val ());
   7.     })
   8.     
   9.     $('#b1').change (function () {
  10.         $('#b2').text ($(this).val ());
  11.     })
  12. });

The problem also appears in 1.4.3 with jQuery UI 1.8.5: http://www.jsfiddle.net/gUc5c/13/

Problem does not occur in 1.4.2 with jUI 1.8.4 http://www.jsfiddle.net/gUc5c/14/

text of bug report copied from:

http://forum.jquery.com/topic/change-event-not-raised-when-using-datepicker-in-ie8

My sincere apologies for the copy/paste. I couldn't have written the bug report better.

Attachments (0)
Change History (1)

Changed November 24, 2010 11:07PM UTC by jitter comment:1

_comment0: Thanks for taking the time to contribute to the jQuery project by writing a bug report and providing a testcase but I'm sorry to tell you that you need to file reports for jQuery UI bugs in the [http://bugs.jqueryui.com/ jQuery UI bug tracker] as this tracker is only for jQuery Core bugs. \ \ This is stated rather clear on the "New Ticket" page where it says \ >'''For jQuery UI (Autocomplete, Sortable, Draggable, Tabs, etc.):''' \ > This is '''NOT''' the correct form! \ \ So please repost this report on the jQuery UI bug tracker. \ \ If you think this is a jQuery Core bug please provide a reproducible reduced test case without jQuery UI dependencies, so that we can look into the issue further.1290640096388816
resolution: → invalid
status: newclosed

Thanks for taking the time to contribute to the jQuery project by writing a bug report and providing a testcase but I have to tell you that you need to file reports for jQuery UI bugs in the jQuery UI bug tracker as this tracker is only for jQuery Core bugs.

This is stated rather clear on the "New Ticket" page where it says

>For jQuery UI (Autocomplete, Sortable, Draggable, Tabs, etc.):

This is NOT the correct form!

So please repost this report on the jQuery UI bug tracker.

If you think this is a jQuery Core bug please provide a reproducible reduced test case without jQuery UI dependencies, so that we can look into the issue further.