mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
draggable, resizable, sortable: proper usage of _mouseCapture, fixes interaction issues when many plugins are used on the same element (Fixes #3164)
This commit is contained in:
parent
cef66ee99f
commit
9d8e83845c
@ -55,7 +55,8 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
||||
this._mouseInit();
|
||||
|
||||
},
|
||||
_mouseStart: function(e) {
|
||||
|
||||
_mouseCapture: function(e) {
|
||||
|
||||
var o = this.options;
|
||||
|
||||
@ -63,10 +64,18 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
||||
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();
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user