aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrant Burnett <btburnett3@gmail.com>2010-02-01 20:59:24 +0000
committerBrant Burnett <btburnett3@gmail.com>2010-02-01 20:59:24 +0000
commitd549ba6d43072f65c56159a136ad4c077d859d36 (patch)
tree6f7edffa1446067bfeeef14cef70ae03085ed24b
parentbae22fb74aa46fa7b59883a09b9987f7e6b27678 (diff)
downloadjquery-ui-d549ba6d43072f65c56159a136ad4c077d859d36.tar.gz
jquery-ui-d549ba6d43072f65c56159a136ad4c077d859d36.zip
Datepicker: No longer dependent on dialog in order to close datepicker when dialog is closed (Refixed #4453 UI Datepicker inside UI Dialog Issue)
-rw-r--r--ui/jquery.ui.datepicker.js7
-rw-r--r--ui/jquery.ui.dialog.js5
2 files changed, 1 insertions, 11 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 38de5bc9d..c0d8533b1 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -652,10 +652,6 @@ $.extend(Datepicker.prototype, {
if (inst.input.is(':visible') && !inst.input.is(':disabled'))
inst.input[0].focus();
$.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); });
}
},
@@ -780,9 +776,6 @@ $.extend(Datepicker.prototype, {
}
}
this._inDialog = false;
-
- if (inst._dialog)
- inst._dialog.unbind('dialogclose.datepicker');
}
},
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index 7d4b3c8cd..752f3ac2f 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -114,9 +114,6 @@ $.widget("ui.dialog", {
.blur(function() {
uiDialogTitlebarClose.removeClass('ui-state-focus');
})
- .mousedown(function(ev) {
- ev.stopPropagation();
- })
.click(function(event) {
self.close(event);
return false;
@@ -327,7 +324,7 @@ $.widget("ui.dialog", {
heightBeforeDrag;
self.uiDialog.draggable({
- cancel: '.ui-dialog-content',
+ cancel: '.ui-dialog-content, .ui-dialog-titlebar-close',
handle: '.ui-dialog-titlebar',
containment: 'document',
start: function(event) {