]> source.dussan.org Git - jquery-ui.git/commitdiff
Core: Removed .focus( delay )
authorScott González <scott.gonzalez@gmail.com>
Mon, 20 Oct 2014 23:26:01 +0000 (19:26 -0400)
committerScott González <scott.gonzalez@gmail.com>
Mon, 20 Oct 2014 23:26:01 +0000 (19:26 -0400)
Fixes #9649

tests/unit/core/core_deprecated.js
ui/core.js

index f97b009a7f3fe1e4ebbfe2f6b49f87fd0f287d43..bb06f77b2734763e35d7ad8234b674d0533239c9 100644 (file)
@@ -2,34 +2,6 @@
 
 module( "core - deprecated" );
 
-asyncTest( "focus - original functionality", function() {
-       expect( 1 );
-       $( "#inputTabindex0" )
-               .one( "focus", function() {
-                       ok( true, "event triggered" );
-                       start();
-               })
-               .focus();
-});
-
-asyncTest( "focus", function() {
-       expect( 2 );
-
-       // support: IE 8
-       // IE sometimes gets confused about what's focused if we don't explicitly
-       // focus a different element first
-       $( "body" ).focus();
-
-       $( "#inputTabindex0" )
-               .one( "focus", function() {
-                       ok( true, "event triggered" );
-                       start();
-               })
-               .focus( 500, function() {
-                       ok( true, "callback triggered" );
-               });
-});
-
 test( "zIndex", function() {
        expect( 7 );
        var el = $( "#zIndexAutoWithParent" ),
index 0bcb46aa7df6cb134aa4efca4442d4d92c1c734f..652884e6b6b46a4f6e83df4f1c3155e2c2691307 100644 (file)
@@ -209,22 +209,6 @@ if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
 $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
 
 $.fn.extend({
-       focus: (function( orig ) {
-               return function( delay, fn ) {
-                       return typeof delay === "number" ?
-                               this.each(function() {
-                                       var elem = this;
-                                       setTimeout(function() {
-                                               $( elem ).focus();
-                                               if ( fn ) {
-                                                       fn.call( elem );
-                                               }
-                                       }, delay );
-                               }) :
-                               orig.apply( this, arguments );
-               };
-       })( $.fn.focus ),
-
        disableSelection: (function() {
                var eventType = "onselectstart" in document.createElement( "div" ) ?
                        "selectstart" :