From 10fa7f9ae9ea68ac11795862a2ccdc813256eb8e Mon Sep 17 00:00:00 2001 From: Andrew Powell Date: Thu, 12 May 2011 11:28:37 -0400 Subject: [PATCH] Datepicker: removed conditional mozilla browser check block. Fixes #7322 - Year selector disappears after setting an option in Firefox (cherry picked from commit a6227be2c09da2c698ee6d5251ac113b90585522) --- ui/jquery.ui.datepicker.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 996528937..93d468c36 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -705,7 +705,7 @@ $.extend(Datepicker.prototype, { var origyearshtml = inst.yearshtml; setTimeout(function(){ //assure that inst.yearshtml didn't change. - if( origyearshtml === inst.yearshtml ){ + if( origyearshtml === inst.yearshtml && inst.yearshtml ){ inst.dpDiv.find('select.ui-datepicker-year:first').replaceWith(inst.yearshtml); } origyearshtml = inst.yearshtml = null; @@ -1602,14 +1602,9 @@ $.extend(Datepicker.prototype, { '>' + year + ''; } inst.yearshtml += ''; - //when showing there is no need for later update - if( ! $.browser.mozilla ){ - html += inst.yearshtml; - inst.yearshtml = null; - } else { - // will be replaced later with inst.yearshtml - html += ''; - } + + html += inst.yearshtml; + inst.yearshtml = null; } } html += this._get(inst, 'yearSuffix'); -- 2.39.5