mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-10-05 01:44:18 +00:00
Datepicker: Fixed #5052 Set focus error in IE8 for disabled and hidden elements
This commit is contained in:
parent
505af6a0e9
commit
c3dd4ac373
5
ui/jquery.ui.datepicker.js
vendored
5
ui/jquery.ui.datepicker.js
vendored
@ -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();
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user