aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2016-04-13 21:54:48 +0200
committerFelix Nagel <info@felixnagel.com>2016-09-28 18:28:33 +0200
commit280cda31d053cea55a6aa3547d88ce9994bff286 (patch)
tree311ceb538c6868c7fd8f5358b1bbc17f9ae78eac /ui
parent3f7446565f51096993f3f9943d7f831bb9cbe03a (diff)
downloadjquery-ui-280cda31d053cea55a6aa3547d88ce9994bff286.tar.gz
jquery-ui-280cda31d053cea55a6aa3547d88ce9994bff286.zip
Datepicker: Always focus calendar grid when opening
Remove arrow down key requirement.
Diffstat (limited to 'ui')
-rw-r--r--ui/widgets/datepicker.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/ui/widgets/datepicker.js b/ui/widgets/datepicker.js
index 99f34785f..6d45055e8 100644
--- a/ui/widgets/datepicker.js
+++ b/ui/widgets/datepicker.js
@@ -140,13 +140,10 @@ var widget = $.widget( "ui.datepicker", {
this.close( event );
}
break;
+ case $.ui.keyCode.ENTER:
case $.ui.keyCode.DOWN:
case $.ui.keyCode.UP:
- clearTimeout( this.closeTimer );
- this._delay( function() {
- this.open( event );
- this.calendarInstance.grid.focus();
- }, 1 );
+ this.open( event );
break;
}
},
@@ -279,6 +276,10 @@ var widget = $.widget( "ui.datepicker", {
this.isOpen = true;
this._trigger( "open", event );
+
+ this._delay( function() {
+ this.calendarInstance.grid.focus();
+ } );
},
close: function( event ) {