From e3bea112c6cb5cd654ae583593ed43b273f9a8e2 Mon Sep 17 00:00:00 2001 From: schettino72 Date: Sun, 6 Jan 2013 15:28:23 +0800 Subject: [PATCH] Datepicker: focus on next element after selecting date. Fixed #7765 - Datepicker: Focus not placed back into textbox after date selection --- ui/jquery.ui.datepicker.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 6f187ecaad7..db187dce56d 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -1015,11 +1015,7 @@ $.extend(Datepicker.prototype, { this._updateDatepicker(inst); } else { this._hideDatepicker(); - this._lastInput = inst.input[0]; - if (typeof(inst.input[0]) !== "object") { - inst.input.focus(); // restore focus - } - this._lastInput = null; + inst.input.next().focus(); } },