Skip to content

Commit

Permalink
Core: Removed .focus( delay )
Browse files Browse the repository at this point in the history
Fixes #9649
  • Loading branch information
scottgonzalez committed Oct 20, 2014
1 parent b2a477f commit 89ed68f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
28 changes: 0 additions & 28 deletions tests/unit/core/core_deprecated.js
Expand Up @@ -2,34 +2,6 @@


module( "core - deprecated" ); 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() { test( "zIndex", function() {
expect( 7 ); expect( 7 );
var el = $( "#zIndexAutoWithParent" ), var el = $( "#zIndexAutoWithParent" ),
Expand Down
16 changes: 0 additions & 16 deletions ui/core.js
Expand Up @@ -209,22 +209,6 @@ if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );


$.fn.extend({ $.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() { disableSelection: (function() {
var eventType = "onselectstart" in document.createElement( "div" ) ? var eventType = "onselectstart" in document.createElement( "div" ) ?
"selectstart" : "selectstart" :
Expand Down

0 comments on commit 89ed68f

Please sign in to comment.