Skip to content
Permalink
Browse files

Don't use :input selector.

  • Loading branch information...
scottgonzalez committed May 21, 2012
1 parent b4ca928 commit 51863d5a71f50c86b1757a1a0840d7571f6a0ef7
@@ -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
@@ -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",
@@ -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");
@@ -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,
@@ -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,
@@ -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,
@@ -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",
@@ -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.");
});

@@ -64,7 +64,7 @@
position();
});
$( ":input" ).bind( "click keyup change", function() { position(); } );
$( "select, input" ).bind( "click keyup change", function() { position(); } );
position();
});
@@ -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
},

0 comments on commit 51863d5

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