Skip to content

Commit 89ed68f

Browse files
committed
Core: Removed .focus( delay )
Fixes #9649
1 parent b2a477f commit 89ed68f

File tree

2 files changed

+0
-44
lines changed

2 files changed

+0
-44
lines changed

tests/unit/core/core_deprecated.js

-28
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,6 @@
22

33
module( "core - deprecated" );
44

5-
asyncTest( "focus - original functionality", function() {
6-
expect( 1 );
7-
$( "#inputTabindex0" )
8-
.one( "focus", function() {
9-
ok( true, "event triggered" );
10-
start();
11-
})
12-
.focus();
13-
});
14-
15-
asyncTest( "focus", function() {
16-
expect( 2 );
17-
18-
// support: IE 8
19-
// IE sometimes gets confused about what's focused if we don't explicitly
20-
// focus a different element first
21-
$( "body" ).focus();
22-
23-
$( "#inputTabindex0" )
24-
.one( "focus", function() {
25-
ok( true, "event triggered" );
26-
start();
27-
})
28-
.focus( 500, function() {
29-
ok( true, "callback triggered" );
30-
});
31-
});
32-
335
test( "zIndex", function() {
346
expect( 7 );
357
var el = $( "#zIndexAutoWithParent" ),

ui/core.js

-16
Original file line numberDiff line numberDiff line change
@@ -209,22 +209,6 @@ if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
209209
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
210210

211211
$.fn.extend({
212-
focus: (function( orig ) {
213-
return function( delay, fn ) {
214-
return typeof delay === "number" ?
215-
this.each(function() {
216-
var elem = this;
217-
setTimeout(function() {
218-
$( elem ).focus();
219-
if ( fn ) {
220-
fn.call( elem );
221-
}
222-
}, delay );
223-
}) :
224-
orig.apply( this, arguments );
225-
};
226-
})( $.fn.focus ),
227-
228212
disableSelection: (function() {
229213
var eventType = "onselectstart" in document.createElement( "div" ) ?
230214
"selectstart" :

0 commit comments

Comments
 (0)