Don't use :input selector.

This commit is contained in:
Scott González 2012-05-21 14:49:49 -04:00
parent b4ca9289cf
commit 51863d5a71
10 changed files with 13 additions and 13 deletions

View File

@ -55,7 +55,7 @@
$( ".positionable" ).css( "opacity", 0.5 );
$( ":input" ).bind( "click keyup change", position );
$( "select, input" ).bind( "click keyup change", position );
$( "#parent" ).draggable({
drag: position

View File

@ -3,7 +3,7 @@ TestHelpers.commonWidgetTests( "draggable", {
addClasses: true,
appendTo: "parent",
axis: false,
cancel: ":input,option",
cancel: "input,textarea,button,select,option",
connectToSortable: false,
containment: false,
cursor: "auto",

View File

@ -106,15 +106,15 @@ test("{ axis: ? }, unexpected", function() {
});
});
test("{ cancel: ':input,option' }, default", function() {
test("{ cancel: 'input,textarea,button,select,option' }, default", function() {
$('<div id="draggable-option-cancel-default"><input type="text"></div>').appendTo('#main');
el = $("#draggable-option-cancel-default").draggable({ cancel: ":input,option" });
el = $("#draggable-option-cancel-default").draggable({ cancel: "input,textarea,button,select,option" });
drag("#draggable-option-cancel-default", 50, 50);
moved(50, 50);
el = $("#draggable-option-cancel-default").draggable({ cancel: ":input,option" });
drag("#draggable-option-cancel-default :input", 50, 50);
el = $("#draggable-option-cancel-default").draggable({ cancel: "input,textarea,button,select,option" });
drag("#draggable-option-cancel-default input", 50, 50);
moved(0, 0);
el.draggable("destroy");

View File

@ -6,7 +6,7 @@ TestHelpers.commonWidgetTests('resizable', {
animateEasing: 'swing',
aspectRatio: false,
autoHide: false,
cancel: ':input,option',
cancel: 'input,textarea,button,select,option',
containment: false,
delay: 0,
disabled: false,

View File

@ -2,7 +2,7 @@ TestHelpers.commonWidgetTests('selectable', {
defaults: {
appendTo: 'body',
autoRefresh: true,
cancel: ':input,option',
cancel: 'input,textarea,button,select,option',
delay: 0,
disabled: false,
distance: 0,

View File

@ -1,7 +1,7 @@
TestHelpers.commonWidgetTests( "slider", {
defaults: {
animate: false,
cancel: ':input,option',
cancel: 'input,textarea,button,select,option',
delay: 0,
disabled: false,
distance: 0,

View File

@ -2,7 +2,7 @@ TestHelpers.commonWidgetTests( "sortable", {
defaults: {
appendTo: "parent",
axis: false,
cancel: ":input,option",
cancel: "input,textarea,button,select,option",
connectWith: false,
containment: false,
cursor: "auto",

View File

@ -29,7 +29,7 @@ test("{ axis: ? }, unexpected", function() {
ok(false, "missing test - untested code is broken code.");
});
test("{ cancel: ':input,button' }, default", function() {
test("{ cancel: 'input,textarea,button,select,option' }, default", function() {
ok(false, "missing test - untested code is broken code.");
});

View File

@ -64,7 +64,7 @@
position();
});
$( ":input" ).bind( "click keyup change", function() { position(); } );
$( "select, input" ).bind( "click keyup change", function() { position(); } );
position();
});

View File

@ -20,7 +20,7 @@ $( document ).mouseup( function( e ) {
$.widget("ui.mouse", {
version: "@VERSION",
options: {
cancel: ':input,option',
cancel: 'input,textarea,button,select,option',
distance: 1,
delay: 0
},