]> source.dussan.org Git - jquery-ui.git/commitdiff
Fixed #3858 - Datepicker not hiding consistently on external click
authorKeith Wood <kbwood.au@gmail.com>
Mon, 19 Jan 2009 09:59:37 +0000 (09:59 +0000)
committerKeith Wood <kbwood.au@gmail.com>
Mon, 19 Jan 2009 09:59:37 +0000 (09:59 +0000)
ui/ui.datepicker.js

index fe14a572112d5a97f9ae37a94d1fa9e430c1c50b..a8ccd8ef39babe3c3a23feb293d9cd4714e7aa41 100644 (file)
@@ -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;
        }