aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2008-07-03 01:37:06 +0000
committerRichard Worth <rdworth@gmail.com>2008-07-03 01:37:06 +0000
commit6e7572309a6c48e129f8fa0906b959c78a8f202d (patch)
tree537216583847307cf428af574a7d72dd83f03254
parenta14c917e8e2986c3f8852e4d6f7b2c842aef1674 (diff)
downloadjquery-ui-6e7572309a6c48e129f8fa0906b959c78a8f202d.tar.gz
jquery-ui-6e7572309a6c48e129f8fa0906b959c78a8f202d.zip
Fixed #3059 - cannot select text in dialog content
-rw-r--r--ui/ui.core.js2
-rw-r--r--ui/ui.dialog.js8
2 files changed, 8 insertions, 2 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js
index 88596c446..3a7238ca8 100644
--- a/ui/ui.core.js
+++ b/ui/ui.core.js
@@ -196,7 +196,7 @@ $.ui.mouse = {
var self = this,
btnIsLeft = (e.which == 1),
- elIsCancel = (typeof this.options.cancel == "string" ? $(e.target).is(this.options.cancel) : false);
+ elIsCancel = (typeof this.options.cancel == "string" ? $(e.target).parents().add(e.target).filter(this.options.cancel).length : false);
if (!btnIsLeft || elIsCancel || !this.mouseCapture(e)) {
return true;
}
diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js
index d6ebbacb1..27123b933 100644
--- a/ui/ui.dialog.js
+++ b/ui/ui.dialog.js
@@ -99,9 +99,14 @@ $.widget("ui.dialog", {
self.close();
return false;
});
-
+
+ this.uiDialogTitlebar.find("*").add(this.uiDialogTitlebar).each(function() {
+ $.ui.disableSelection(this);
+ });
+
if ($.fn.draggable) {
uiDialog.draggable({
+ cancel: '.ui-dialog-content',
helper: options.dragHelper,
handle: '.ui-dialog-titlebar',
start: function(e, ui) {
@@ -121,6 +126,7 @@ $.widget("ui.dialog", {
if ($.fn.resizable) {
uiDialog.resizable({
+ cancel: '.ui-dialog-content',
helper: options.resizeHelper,
maxWidth: options.maxWidth,
maxHeight: options.maxHeight,