diff options
-rw-r--r-- | ui/ui.draggable.js | 19 | ||||
-rw-r--r-- | ui/ui.resizable.js | 10 | ||||
-rw-r--r-- | ui/ui.sortable.js | 2 |
3 files changed, 24 insertions, 7 deletions
diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js index eb3d9a558..1179c7df8 100644 --- a/ui/ui.draggable.js +++ b/ui/ui.draggable.js @@ -55,18 +55,27 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, { this._mouseInit(); }, - _mouseStart: function(e) { - + + _mouseCapture: function(e) { + var o = this.options; if (this.helper || o.disabled || $(e.target).is('.ui-resizable-handle')) return false; - + //Quit if we're not on a valid handle - var handle = this.getHandle(e); - if (!handle) + this.handle = this.getHandle(e); + if (!this.handle) return false; + return true; + + }, + + _mouseStart: function(e) { + + var o = this.options; + //Create and append the visible helper this.helper = this.createHelper(); diff --git a/ui/ui.resizable.js b/ui/ui.resizable.js index ea44837f7..8975a75f5 100644 --- a/ui/ui.resizable.js +++ b/ui/ui.resizable.js @@ -257,7 +257,9 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, { _destroy(wrapped); } }, - _mouseStart: function(e) { + + _mouseCapture: function(e) { + if(this.options.disabled) return false; var handle = false; @@ -266,6 +268,12 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, { } if (!handle) return false; + return true; + + }, + + _mouseStart: function(e) { + var o = this.options, iniPos = this.element.position(), el = this.element, num = function(v) { return parseInt(v, 10) || 0; }, ie6 = $.browser.msie && $.browser.version < 7; o.resizing = true; diff --git a/ui/ui.sortable.js b/ui/ui.sortable.js index 2ec6291de..74bb422e9 100644 --- a/ui/ui.sortable.js +++ b/ui/ui.sortable.js @@ -361,7 +361,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, { }, _mouseCapture: function(e, overrideHandle) { - + if(this.options.disabled || this.options.type == 'static') return false; //We have to refresh the items data once first |