diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 6f187ecaad7..f61c6b54fe9 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -1014,12 +1014,8 @@ $.extend(Datepicker.prototype, { if (inst.inline){ this._updateDatepicker(inst); } else { + inst.input.focus(); this._hideDatepicker(); - this._lastInput = inst.input[0]; - if (typeof(inst.input[0]) !== "object") { - inst.input.focus(); // restore focus - } - this._lastInput = null; } },