]> source.dussan.org Git - jquery-ui.git/commitdiff
Don't use :input selector.
authorScott González <scott.gonzalez@gmail.com>
Mon, 21 May 2012 18:49:49 +0000 (14:49 -0400)
committerScott González <scott.gonzalez@gmail.com>
Mon, 21 May 2012 18:49:49 +0000 (14:49 -0400)
demos/position/default.html
tests/unit/draggable/draggable_common.js
tests/unit/draggable/draggable_options.js
tests/unit/resizable/resizable_common.js
tests/unit/selectable/selectable_common.js
tests/unit/slider/slider_common.js
tests/unit/sortable/sortable_common.js
tests/unit/sortable/sortable_options.js
tests/visual/position/position.html
ui/jquery.ui.mouse.js

index 01137be62d370aa91368a4f42069e491beda79c5..35004b9936ca09f20b44c72a752c4cac3afb972d 100644 (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
index b47b139cd2f4f80590fe9aefdccf886ce02d81bc..64f8ce4a3280118d1e0f8b7086d3b8e823aa0c53 100644 (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",
index 464e025ddad9a046dce5cbeb0ffcaa60be100fe6..ea4611d692bbe93ecb65a8eae0fbec14d3a3a3e8 100644 (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");
index 617cdd2ad59a5c32e26d939afa6b0c5a907bcc95..119f5bd0ed6db001411b15320848208720e07ef3 100644 (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,
index 27714d0ae875c6ce20812f20e3aefd8716eb29b4..885e7940128202b236aa863bb3d3fe49bf2869da 100644 (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,
index 8a0b347f3a21f6917e8d2c8c500f84bfc9a51760..ccf793549e4b70816200ed5a85939c8dd3890dbb 100644 (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,
index b5fc05a5de222ada42e0f2373f22ca1bc30510bd..ae21f7dd260fa8665b57f048cb4b6e8c80efc092 100644 (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",
index 507d5dcfae2f988f574af60bb37098983b956e81..a043e68fe66b9972b592940c6d32e409e564928e 100644 (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.");
 });
 
index 2fbe8e95dfd75f19fdc36cd77fe42203ecad74d7..545dc6993001bad00a5779c13ba478bb76c6c814 100644 (file)
@@ -64,7 +64,7 @@
                                position();
                        });
 
-                       $( ":input" ).bind( "click keyup change", function() { position(); } );
+                       $( "select, input" ).bind( "click keyup change", function() { position(); } );
 
                        position();
                });
index eaa953ad00608de370e6579ea488248916ce805d..e2e06897c620fc6bd1cc3b88da24d3c32f4ffa7a 100644 (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
        },