From: Keith Wood Date: Mon, 19 Jan 2009 09:59:37 +0000 (+0000) Subject: Fixed #3858 - Datepicker not hiding consistently on external click X-Git-Tag: 1.6rc6~215 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a91095e60dd610aadde5eb4f1ef87302490d36f3;p=jquery-ui.git Fixed #3858 - Datepicker not hiding consistently on external click --- diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js index fe14a5721..a8ccd8ef3 100644 --- a/ui/ui.datepicker.js +++ b/ui/ui.datepicker.js @@ -1594,8 +1594,8 @@ $.fn.datepicker = function(options){ /* Initialise the date picker. */ if (!$.datepicker.initialized) { - $(document.body).append($.datepicker.dpDiv). - mousedown($.datepicker._checkExternalClick); + $(document).mousedown($.datepicker._checkExternalClick). + find('body').append($.datepicker.dpDiv); $.datepicker.initialized = true; }