mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Datepicker: Fixed #4453 UI Datepicker inside UI Dialog Issue
This commit is contained in:
parent
a4daa10f53
commit
5b61537e6e
7
ui/jquery.ui.datepicker.js
vendored
7
ui/jquery.ui.datepicker.js
vendored
@ -651,6 +651,10 @@ $.extend(Datepicker.prototype, {
|
|||||||
if (inst.input.is(':visible') && !inst.input.is(':disabled'))
|
if (inst.input.is(':visible') && !inst.input.is(':disabled'))
|
||||||
inst.input[0].focus();
|
inst.input[0].focus();
|
||||||
$.datepicker._curInst = inst;
|
$.datepicker._curInst = inst;
|
||||||
|
|
||||||
|
// find the dialog wrapping the input, if any, and bind to close event
|
||||||
|
inst._dialog = $(input).closest('.ui-dialog-content')
|
||||||
|
.bind('dialogclose.datepicker', function() { $.datepicker._hideDatepicker(input); });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -775,6 +779,9 @@ $.extend(Datepicker.prototype, {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this._inDialog = false;
|
this._inDialog = false;
|
||||||
|
|
||||||
|
if (inst._dialog)
|
||||||
|
inst._dialog.unbind('dialogclose.datepicker');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
2
ui/jquery.ui.dialog.js
vendored
2
ui/jquery.ui.dialog.js
vendored
@ -601,7 +601,7 @@ $.extend($.ui.dialog.overlay, {
|
|||||||
if ($.ui.dialog.overlay.instances.length) {
|
if ($.ui.dialog.overlay.instances.length) {
|
||||||
$(document).bind($.ui.dialog.overlay.events, function(event) {
|
$(document).bind($.ui.dialog.overlay.events, function(event) {
|
||||||
// stop events if the z-index of the target is <= the z-index of the overlay
|
// stop events if the z-index of the target is <= the z-index of the overlay
|
||||||
return ($(event.target).zIndex() > $.ui.dialog.overlay.maxZ);
|
return ($(event.target).zIndex() >= $.ui.dialog.overlay.maxZ);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, 1);
|
}, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user