mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Datepicker: Improve document click event
This commit is contained in:
parent
6dfcd937f9
commit
43025392c5
@ -184,8 +184,12 @@ widget = $.widget( "ui.datepicker", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_documentEvents: {
|
_documentEvents: {
|
||||||
click: function( event ) {
|
mousedown: function( event ) {
|
||||||
if ( this.isOpen && !$( event.target ).closest( this.element.add( this.calendar ) ).length ) {
|
if ( !this.isOpen ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !$( event.target ).closest( this.element.add( this.calendar ) ).length ) {
|
||||||
this.close( event );
|
this.close( event );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user