Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#7322 closed bug (fixed)

Datepicker: Year selector disappears after setting an option in Firefox

Reported by: ThiefMaster Owned by:
Priority: blocker Milestone: 1.8.13
Component: ui.datepicker Version: 1.8.12
Keywords: Cc:
Blocked by: Blocking:

Description

1.8.12 introduced a bug breaking the year selector when setting an option after creating the datepicker.

Here's a minimal testcase: http://jsfiddle.net/ThiefMaster/XqT5H/1/

Change History (12)

comment:1 Changed 12 years ago by utkarsh

On Windows 7, this bug exists on Firefox 4, but not on Chrome 11 or Opera.

comment:2 Changed 12 years ago by Scott González

Priority: minorblocker
Status: newopen
Summary: Year selector disappears after setting an optionDatepicker: Year selector disappears after setting an option in Firefox

comment:3 Changed 12 years ago by MatrixFrog

I'm not familiar with the JQuery UI code at all, but using the Firebug debugger, I found that this line (line 7822, near the top of _updateDatePicker) is when the dropdown actually disappears:

inst.dpDiv.empty().append(this._generateHTML(inst));

Also possibly worth noting is that if you set a breakpoint at that line, it will hit it twice, first from _setDateDatepicker and then again from _updateDatepicker. The second time is the one that makes the year dropdown go away.

Hopefully this is enough of a starting point to help someone fix this...

comment:4 Changed 12 years ago by gplocke

The issue seems to be happening only in Firefox, and is caused by the _updateDatepicker method being called twice. Removing the duplicate call seems to fix the problem.

Fix for this is provided with pull request: https://github.com/jquery/jquery-ui/pull/210

The original commit is here: https://github.com/gplocke/jquery-ui/commit/f3ee592c283bacdf9b0de50f23eca2cc038a2b42

Last edited 12 years ago by gplocke (previous) (diff)

comment:5 Changed 12 years ago by Garrison Locke

Resolution: fixed
Status: openclosed

Datepicker: Removed duplicate call to _updateDatepicker when changing option in Firefox. Fixed #7322 - datepicker: Year would disappear when changing option.

Changeset: a645630ebaf02febb19a5c9e28f1e46401f07ed0

comment:6 Changed 12 years ago by Garrison Locke

Datepicker: Removed duplicate call to _updateDatepicker when changing option in Firefox. Fixed #7322 - datepicker: Year would disappear when changing option. (cherry picked from commit a645630ebaf02febb19a5c9e28f1e46401f07ed0)

Changeset: 3edda96f2a65a5c9544eab2b736dcd8b84edd8db

comment:7 Changed 12 years ago by Scott González

Milestone: 1.91.8.13

comment:8 Changed 12 years ago by ThiefMaster

Unfortunately this does not fully fix the issue.

See http://jsfiddle.net/ThiefMaster/XqT5H/7/ for a case where it still bugs when setting an option right after creating the datepicker.

It does work when invoking the option "call" inside a zero-delay setTimeout callback though.. very odd.

Last edited 12 years ago by ThiefMaster (previous) (diff)

comment:9 Changed 12 years ago by Corey Frang

Resolution: fixed
Status: closedreopened

Confirming that http://jsfiddle.net/gnarf/XqT5H/8/ in Firefox is still broken

Version 0, edited 12 years ago by Corey Frang (next)

comment:10 Changed 12 years ago by Andrew Powell

Resolution: fixed
Status: reopenedclosed

Datepicker: removed conditional mozilla browser check block. Fixes #7322 - Year selector disappears after setting an option in Firefox

Changeset: a6227be2c09da2c698ee6d5251ac113b90585522

comment:11 Changed 12 years ago by Andrew Powell

Datepicker: removed conditional mozilla browser check block. Fixes #7322 - Year selector disappears after setting an option in Firefox (cherry picked from commit a6227be2c09da2c698ee6d5251ac113b90585522)

Changeset: 10fa7f9ae9ea68ac11795862a2ccdc813256eb8e

comment:12 Changed 12 years ago by rdworth

#6847 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.