Skip to content
Permalink
Browse files

All mouse-based plugins: Extend $.ui.mouse.defaults. Changed $.ui.mou…

…se.defaults.cancel to ":input,option" which is used by every plugin as its default. Fixes #4584 ($.ui.mouse.defaults never used).
  • Loading branch information...
scottgonzalez committed Jun 9, 2009
1 parent ce94b54 commit 8634ba993ceec7c9bbd34b6e0e2a666494b385a4
Showing with 11 additions and 23 deletions.
  1. +1 −1 ui/ui.core.js
  2. +2 −5 ui/ui.draggable.js
  3. +2 −5 ui/ui.resizable.js
  4. +2 −4 ui/ui.selectable.js
  5. +2 −3 ui/ui.slider.js
  6. +2 −5 ui/ui.sortable.js
@@ -519,7 +519,7 @@ $.ui.mouse = {
};

$.ui.mouse.defaults = {
cancel: null,
cancel: ':input,option',
distance: 1,
delay: 0
};
@@ -404,17 +404,14 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
$.extend($.ui.draggable, {
version: "@VERSION",
eventPrefix: "drag",
defaults: {
defaults: $.extend({}, $.ui.mouse.defaults, {
addClasses: true,
appendTo: "parent",
axis: false,
cancel: ":input,option",
connectToSortable: false,
containment: false,
cursor: "auto",
cursorAt: false,
delay: 0,
distance: 1,
grid: false,
handle: false,
helper: "original",
@@ -432,7 +429,7 @@ $.extend($.ui.draggable, {
snapTolerance: 20,
stack: false,
zIndex: false
}
})
});

$.ui.plugin.add("draggable", "connectToSortable", {
@@ -501,17 +501,14 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {
$.extend($.ui.resizable, {
version: "@VERSION",
eventPrefix: "resize",
defaults: {
defaults: $.extend({}, $.ui.mouse.defaults, {
alsoResize: false,
animate: false,
animateDuration: "slow",
animateEasing: "swing",
aspectRatio: false,
autoHide: false,
cancel: ":input,option",
containment: false,
delay: 0,
distance: 1,
ghost: false,
grid: false,
handles: "e,s,se",
@@ -521,7 +518,7 @@ $.extend($.ui.resizable, {
minHeight: 10,
minWidth: 10,
zIndex: 1000
}
})
});

/*
@@ -245,15 +245,13 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {

$.extend($.ui.selectable, {
version: "@VERSION",
defaults: {
defaults: $.extend({}, $.ui.mouse.defaults, {
appendTo: 'body',
autoRefresh: true,
cancel: ":input,option",
delay: 0,
distance: 0,
filter: '*',
tolerance: 'touch'
}
})
});

})(jQuery);
@@ -541,9 +541,8 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
$.extend($.ui.slider, {
version: "@VERSION",
eventPrefix: "slide",
defaults: {
defaults: $.extend({}, $.ui.mouse.defaults, {
animate: false,
delay: 0,
distance: 0,
max: 100,
min: 0,
@@ -552,7 +551,7 @@ $.extend($.ui.slider, {
step: 1,
value: 0,
values: null
}
})
});

})(jQuery);
@@ -990,16 +990,13 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
$.extend($.ui.sortable, {
version: "@VERSION",
eventPrefix: "sort",
defaults: {
defaults: $.extend({}, $.ui.mouse.defaults, {
appendTo: "parent",
axis: false,
cancel: ":input,option",
connectWith: false,
containment: false,
cursor: 'auto',
cursorAt: false,
delay: 0,
distance: 1,
dropOnEmpty: true,
forcePlaceholderSize: false,
forceHelperSize: false,
@@ -1016,7 +1013,7 @@ $.extend($.ui.sortable, {
scope: "default",
tolerance: "intersect",
zIndex: 1000
}
})
});

})(jQuery);

0 comments on commit 8634ba9

Please sign in to comment.
You can’t perform that action at this time.