Skip to content

Commit 51863d5

Browse files
committed
Don't use :input selector.
1 parent b4ca928 commit 51863d5

File tree

10 files changed

+13
-13
lines changed

10 files changed

+13
-13
lines changed

demos/position/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
$( ".positionable" ).css( "opacity", 0.5 );
5757

58-
$( ":input" ).bind( "click keyup change", position );
58+
$( "select, input" ).bind( "click keyup change", position );
5959

6060
$( "#parent" ).draggable({
6161
drag: position

tests/unit/draggable/draggable_common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ TestHelpers.commonWidgetTests( "draggable", {
33
addClasses: true,
44
appendTo: "parent",
55
axis: false,
6-
cancel: ":input,option",
6+
cancel: "input,textarea,button,select,option",
77
connectToSortable: false,
88
containment: false,
99
cursor: "auto",

tests/unit/draggable/draggable_options.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ test("{ axis: ? }, unexpected", function() {
106106
});
107107
});
108108

109-
test("{ cancel: ':input,option' }, default", function() {
109+
test("{ cancel: 'input,textarea,button,select,option' }, default", function() {
110110
$('<div id="draggable-option-cancel-default"><input type="text"></div>').appendTo('#main');
111111

112-
el = $("#draggable-option-cancel-default").draggable({ cancel: ":input,option" });
112+
el = $("#draggable-option-cancel-default").draggable({ cancel: "input,textarea,button,select,option" });
113113
drag("#draggable-option-cancel-default", 50, 50);
114114
moved(50, 50);
115115

116-
el = $("#draggable-option-cancel-default").draggable({ cancel: ":input,option" });
117-
drag("#draggable-option-cancel-default :input", 50, 50);
116+
el = $("#draggable-option-cancel-default").draggable({ cancel: "input,textarea,button,select,option" });
117+
drag("#draggable-option-cancel-default input", 50, 50);
118118
moved(0, 0);
119119

120120
el.draggable("destroy");

tests/unit/resizable/resizable_common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ TestHelpers.commonWidgetTests('resizable', {
66
animateEasing: 'swing',
77
aspectRatio: false,
88
autoHide: false,
9-
cancel: ':input,option',
9+
cancel: 'input,textarea,button,select,option',
1010
containment: false,
1111
delay: 0,
1212
disabled: false,

tests/unit/selectable/selectable_common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ TestHelpers.commonWidgetTests('selectable', {
22
defaults: {
33
appendTo: 'body',
44
autoRefresh: true,
5-
cancel: ':input,option',
5+
cancel: 'input,textarea,button,select,option',
66
delay: 0,
77
disabled: false,
88
distance: 0,

tests/unit/slider/slider_common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
TestHelpers.commonWidgetTests( "slider", {
22
defaults: {
33
animate: false,
4-
cancel: ':input,option',
4+
cancel: 'input,textarea,button,select,option',
55
delay: 0,
66
disabled: false,
77
distance: 0,

tests/unit/sortable/sortable_common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ TestHelpers.commonWidgetTests( "sortable", {
22
defaults: {
33
appendTo: "parent",
44
axis: false,
5-
cancel: ":input,option",
5+
cancel: "input,textarea,button,select,option",
66
connectWith: false,
77
containment: false,
88
cursor: "auto",

tests/unit/sortable/sortable_options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ test("{ axis: ? }, unexpected", function() {
2929
ok(false, "missing test - untested code is broken code.");
3030
});
3131

32-
test("{ cancel: ':input,button' }, default", function() {
32+
test("{ cancel: 'input,textarea,button,select,option' }, default", function() {
3333
ok(false, "missing test - untested code is broken code.");
3434
});
3535

tests/visual/position/position.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
position();
6565
});
6666

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

6969
position();
7070
});

ui/jquery.ui.mouse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ $( document ).mouseup( function( e ) {
2020
$.widget("ui.mouse", {
2121
version: "@VERSION",
2222
options: {
23-
cancel: ':input,option',
23+
cancel: 'input,textarea,button,select,option',
2424
distance: 1,
2525
delay: 0
2626
},

0 commit comments

Comments
 (0)