From 4b186675af2dd02878b538de212780f3df102ae3 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Mon, 9 Jun 2008 01:54:28 +0000 Subject: ui-core: added mouseCapture, replacing the condition feature before. Allows text to be selected in sortables on non-handles. --- ui/ui.core.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ui/ui.core.js') diff --git a/ui/ui.core.js b/ui/ui.core.js index 1e8fa48b9..2c668a62e 100644 --- a/ui/ui.core.js +++ b/ui/ui.core.js @@ -199,7 +199,7 @@ $.ui.mouse = { var self = this, btnIsLeft = (e.which == 1), elIsCancel = (typeof this.options.cancel == "string" ? $(e.target).is(this.options.cancel) : false); - if (!btnIsLeft || elIsCancel) { + if (!btnIsLeft || elIsCancel || !this.mouseCapture(e)) { return true; } @@ -277,7 +277,8 @@ $.ui.mouse = { // These are placeholder methods, to be overriden by extending plugin mouseStart: function(e) {}, mouseDrag: function(e) {}, - mouseStop: function(e) {} + mouseStop: function(e) {}, + mouseCapture: function(e) { return true; } }; $.ui.mouse.defaults = { -- cgit v1.2.3