aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.datepicker.js
diff options
context:
space:
mode:
authorKeith Wood <kbwood.au@gmail.com>2010-01-25 08:20:28 +0000
committerKeith Wood <kbwood.au@gmail.com>2010-01-25 08:20:28 +0000
commitc3dd4ac373660b1d36eb527a7ad1387d5d39ef9d (patch)
tree6479b8d3c8a9c41f10b97470eb5bccc9f95e959b /ui/jquery.ui.datepicker.js
parent505af6a0e9d6b68d9decd26909ecf239cbd1bf9e (diff)
downloadjquery-ui-c3dd4ac373660b1d36eb527a7ad1387d5d39ef9d.tar.gz
jquery-ui-c3dd4ac373660b1d36eb527a7ad1387d5d39ef9d.zip
Datepicker: Fixed #5052 Set focus error in IE8 for disabled and hidden elements
Diffstat (limited to 'ui/jquery.ui.datepicker.js')
-rw-r--r--ui/jquery.ui.datepicker.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 6e5fe8b00..ffd20db2d 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -647,7 +647,7 @@ $.extend(Datepicker.prototype, {
inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
if (!showAnim)
postProcess();
- if (inst.input[0].type != 'hidden')
+ if (inst.input.is(':visible') && !inst.input.is(':disabled'))
inst.input[0].focus();
$.datepicker._curInst = inst;
}
@@ -691,7 +691,8 @@ $.extend(Datepicker.prototype, {
'Class']('ui-datepicker-multi');
inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
'Class']('ui-datepicker-rtl');
- if (inst.input && inst.input[0].type != 'hidden' && inst == $.datepicker._curInst)
+ if (inst == $.datepicker._curInst && inst.input &&
+ inst.input.is(':visible') && !inst.input.is(':disabled'))
$(inst.input[0]).focus();
},