mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Don't use :input selector.
This commit is contained in:
parent
b4ca9289cf
commit
51863d5a71
@ -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();
|
||||
});
|
||||
|
2
ui/jquery.ui.mouse.js
vendored
2
ui/jquery.ui.mouse.js
vendored
@ -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
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user