Skip to content

Commit f4ef03e

Browse files
authored
All: Resolve most jQuery Migrate warnings
Closes gh-1919
1 parent b36d542 commit f4ef03e

File tree

10 files changed

+11
-9
lines changed

10 files changed

+11
-9
lines changed

demos/tabs/sortable.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
stop: function(event, ui) {
2323
tabs.tabs( "refresh" );
2424
if (previouslyFocused) {
25-
ui.item.focus();
25+
ui.item.trigger( "focus" );
2626
}
2727
}
2828
});

tests/unit/button/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ QUnit.test( "Disabled button loses focus", function( assert ) {
1212
assert.expect( 2 );
1313
var element = $( "#button" ).button();
1414

15-
element.focus();
15+
element.trigger( "focus" );
1616
setTimeout( function() {
1717

1818
assert.equal( element[ 0 ], $.ui.safeActiveElement( document ), "Button is focused" );

tests/unit/checkboxradio/core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ QUnit.test( "Ensure checked after single click on checkbox label button", functi
3434
var ready = assert.async();
3535
assert.expect( 2 );
3636

37-
$( "#check2" ).checkboxradio().change( function() {
37+
$( "#check2" ).checkboxradio().on( "change", function() {
3838
var label = $( this ).checkboxradio( "widget" );
3939
assert.ok( this.checked, "checked ok" );
4040

@@ -59,7 +59,7 @@ QUnit.test( "Handle form association via form attribute", function( assert ) {
5959
var radio2 = $( "#crazy-form-2" ).checkboxradio();
6060
var radio2Label = radio2.checkboxradio( "widget" );
6161

62-
radio2.change( function() {
62+
radio2.on( "change", function() {
6363
assert.ok( this.checked, "#2 checked" );
6464
assert.ok( !radio1[ 0 ].checked, "#1 not checked" );
6565

tests/unit/checkboxradio/events.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ QUnit.test( "Checkbox shows focus when using keyboard navigation", function( ass
3535
var check = $( "#check" ).checkboxradio(),
3636
label = $( "label[for='check']" );
3737
assert.lacksClasses( label, "ui-state-focus" );
38-
check.focus();
38+
check.trigger( "focus" );
3939
setTimeout( function() {
4040
assert.hasClasses( label, "ui-state-focus" );
4141
ready();

tests/unit/menu/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ QUnit.test( "active menu item styling", function( assert ) {
9696
setTimeout( function() {
9797
isActive( parentItem );
9898
isActive( childItem );
99-
element.blur();
99+
element.trigger( "blur" );
100100
setTimeout( function() {
101101
isInactive( parentItem );
102102
isInactive( childItem );

ui/effects/effect-size.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ return $.effects.define( "size", function( options, done ) {
105105
to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top;
106106
to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left;
107107
}
108+
delete from.outerHeight;
109+
delete from.outerWidth;
108110
element.css( from );
109111

110112
// Animate the children if desired

ui/safe-offset.js

Whitespace-only changes.

ui/widgets/button.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ $.widget( "ui.button", {
263263
this._toggleClass( null, "ui-state-disabled", value );
264264
this.element[ 0 ].disabled = value;
265265
if ( value ) {
266-
this.element.blur();
266+
this.element.trigger( "blur" );
267267
}
268268
}
269269
},

ui/widgets/selectmenu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ return $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
9797
this.labels = this.element.labels().attr( "for", this.ids.button );
9898
this._on( this.labels, {
9999
click: function( event ) {
100-
this.button.focus();
100+
this.button.trigger( "focus" );
101101
event.preventDefault();
102102
}
103103
} );

ui/widgets/tooltip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ $.widget( "ui.tooltip", {
331331
position( positionOption.of );
332332
clearInterval( delayedShow );
333333
}
334-
}, $.fx.interval );
334+
}, 13 );
335335
}
336336

337337
this._trigger( "open", event, { tooltip: tooltip } );

0 commit comments

Comments
 (0)