]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: use a setTimeout 0 so the same code can run in IE (as other browsers...
authorRichard D. Worth <rdworth@gmail.com>
Wed, 4 Aug 2010 09:39:54 +0000 (02:39 -0700)
committerRichard D. Worth <rdworth@gmail.com>
Wed, 4 Aug 2010 09:39:54 +0000 (02:39 -0700)
ui/jquery.ui.datepicker.js

index 6c4fda8e602484a9203868fefb0b0c99b64caddd..27ffadbff00e932190c37a58a37c445aec3059f1 100644 (file)
@@ -846,8 +846,11 @@ $.extend(Datepicker.prototype, {
        _clickMonthYear: function(id) {
                var target = $(id);
                var inst = this._getInst(target[0]);
-               if (inst.input && inst._selectingMonthYear && !$.browser.msie)
-                       inst.input.focus();
+               if (inst.input && inst._selectingMonthYear) {
+                       setTimeout(function() {
+                               inst.input.focus();
+                       }, 0);
+               }
                inst._selectingMonthYear = !inst._selectingMonthYear;
        },