Skip to content

Commit

Permalink
External Libraries: Update the jQuery UI library to version 1.13.2.
Browse files Browse the repository at this point in the history
This is a bug fix release. For more information on the changes included, see https://jqueryui.com/changelog/1.13.2/.

Props Clorith, monolithon, desrosj.
Fixes #56239.
Built from https://develop.svn.wordpress.org/trunk@54209


git-svn-id: http://core.svn.wordpress.org/trunk@53768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
desrosj committed Sep 19, 2022
1 parent 34cd38a commit 0fe6115
Show file tree
Hide file tree
Showing 76 changed files with 889 additions and 883 deletions.
96 changes: 48 additions & 48 deletions wp-includes/js/jquery/ui/accordion.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery UI Accordion 1.13.1
* jQuery UI Accordion 1.13.2
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
Expand Down Expand Up @@ -37,7 +37,7 @@
"use strict";

return $.widget( "ui.accordion", {
version: "1.13.1",
version: "1.13.2",
options: {
active: 0,
animate: {},
Expand Down Expand Up @@ -204,24 +204,24 @@ return $.widget( "ui.accordion", {
toFocus = false;

switch ( event.keyCode ) {
case keyCode.RIGHT:
case keyCode.DOWN:
toFocus = this.headers[ ( currentIndex + 1 ) % length ];
break;
case keyCode.LEFT:
case keyCode.UP:
toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
break;
case keyCode.SPACE:
case keyCode.ENTER:
this._eventHandler( event );
break;
case keyCode.HOME:
toFocus = this.headers[ 0 ];
break;
case keyCode.END:
toFocus = this.headers[ length - 1 ];
break;
case keyCode.RIGHT:
case keyCode.DOWN:
toFocus = this.headers[ ( currentIndex + 1 ) % length ];
break;
case keyCode.LEFT:
case keyCode.UP:
toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
break;
case keyCode.SPACE:
case keyCode.ENTER:
this._eventHandler( event );
break;
case keyCode.HOME:
toFocus = this.headers[ 0 ];
break;
case keyCode.END:
toFocus = this.headers[ length - 1 ];
break;
}

if ( toFocus ) {
Expand All @@ -244,28 +244,28 @@ return $.widget( "ui.accordion", {

// Was collapsed or no panel
if ( ( options.active === false && options.collapsible === true ) ||
!this.headers.length ) {
!this.headers.length ) {
options.active = false;
this.active = $();

// active false only when collapsible is true
// active false only when collapsible is true
} else if ( options.active === false ) {
this._activate( 0 );

// was active, but active panel is gone
// was active, but active panel is gone
} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {

// all remaining panel are disabled
if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) {
options.active = false;
this.active = $();

// activate previous panel
// activate previous panel
} else {
this._activate( Math.max( 0, options.active - 1 ) );
}

// was active, active panel still exists
// was active, active panel still exists
} else {

// make sure active index is correct
Expand Down Expand Up @@ -322,20 +322,20 @@ return $.widget( "ui.accordion", {
panel.attr( "aria-labelledby", headerId );
} )
.next()
.attr( "role", "tabpanel" );
.attr( "role", "tabpanel" );

this.headers
.not( this.active )
.attr( {
"aria-selected": "false",
"aria-expanded": "false",
tabIndex: -1
} )
.next()
.attr( {
"aria-hidden": "true"
} )
.hide();
.attr( {
"aria-selected": "false",
"aria-expanded": "false",
tabIndex: -1
} )
.next()
.attr( {
"aria-hidden": "true"
} )
.hide();

// Make sure at least one header is in the tab order
if ( !this.active.length ) {
Expand All @@ -347,9 +347,9 @@ return $.widget( "ui.accordion", {
tabIndex: 0
} )
.next()
.attr( {
"aria-hidden": "false"
} );
.attr( {
"aria-hidden": "false"
} );
}

this._createIcons();
Expand Down Expand Up @@ -454,11 +454,11 @@ return $.widget( "ui.accordion", {

if (

// click on active header, but not collapsible
( clickedIsActive && !options.collapsible ) ||
// click on active header, but not collapsible
( clickedIsActive && !options.collapsible ) ||

// allow canceling activation
( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
// allow canceling activation
( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
return;
}

Expand Down Expand Up @@ -534,11 +534,11 @@ return $.widget( "ui.accordion", {
toShow
.attr( "aria-hidden", "false" )
.prev()
.attr( {
"aria-selected": "true",
"aria-expanded": "true",
tabIndex: 0
} );
.attr( {
"aria-selected": "true",
"aria-expanded": "true",
tabIndex: 0
} );
},

_animate: function( toShow, toHide, data ) {
Expand Down
4 changes: 2 additions & 2 deletions wp-includes/js/jquery/ui/accordion.min.js

Large diffs are not rendered by default.

128 changes: 64 additions & 64 deletions wp-includes/js/jquery/ui/autocomplete.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery UI Autocomplete 1.13.1
* jQuery UI Autocomplete 1.13.2
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
Expand Down Expand Up @@ -36,7 +36,7 @@
"use strict";

$.widget( "ui.autocomplete", {
version: "1.13.1",
version: "1.13.2",
defaultElement: "<input>",
options: {
appendTo: null,
Expand Down Expand Up @@ -104,58 +104,58 @@ $.widget( "ui.autocomplete", {
suppressKeyPressRepeat = false;
var keyCode = $.ui.keyCode;
switch ( event.keyCode ) {
case keyCode.PAGE_UP:
suppressKeyPress = true;
this._move( "previousPage", event );
break;
case keyCode.PAGE_DOWN:
suppressKeyPress = true;
this._move( "nextPage", event );
break;
case keyCode.UP:
suppressKeyPress = true;
this._keyEvent( "previous", event );
break;
case keyCode.DOWN:
case keyCode.PAGE_UP:
suppressKeyPress = true;
this._move( "previousPage", event );
break;
case keyCode.PAGE_DOWN:
suppressKeyPress = true;
this._move( "nextPage", event );
break;
case keyCode.UP:
suppressKeyPress = true;
this._keyEvent( "previous", event );
break;
case keyCode.DOWN:
suppressKeyPress = true;
this._keyEvent( "next", event );
break;
case keyCode.ENTER:

// when menu is open and has focus
if ( this.menu.active ) {

// #6055 - Opera still allows the keypress to occur
// which causes forms to submit
suppressKeyPress = true;
this._keyEvent( "next", event );
break;
case keyCode.ENTER:

// when menu is open and has focus
if ( this.menu.active ) {

// #6055 - Opera still allows the keypress to occur
// which causes forms to submit
suppressKeyPress = true;
event.preventDefault();
this.menu.select( event );
}
break;
case keyCode.TAB:
if ( this.menu.active ) {
this.menu.select( event );
}
break;
case keyCode.ESCAPE:
if ( this.menu.element.is( ":visible" ) ) {
if ( !this.isMultiLine ) {
this._value( this.term );
}
this.close( event );

// Different browsers have different default behavior for escape
// Single press can mean undo or clear
// Double press in IE means clear the whole form
event.preventDefault();
event.preventDefault();
this.menu.select( event );
}
break;
case keyCode.TAB:
if ( this.menu.active ) {
this.menu.select( event );
}
break;
case keyCode.ESCAPE:
if ( this.menu.element.is( ":visible" ) ) {
if ( !this.isMultiLine ) {
this._value( this.term );
}
break;
default:
suppressKeyPressRepeat = true;
this.close( event );

// Different browsers have different default behavior for escape
// Single press can mean undo or clear
// Double press in IE means clear the whole form
event.preventDefault();
}
break;
default:
suppressKeyPressRepeat = true;

// search timeout should be triggered before the input value is changed
this._searchTimeout( event );
break;
// search timeout should be triggered before the input value is changed
this._searchTimeout( event );
break;
}
},
keypress: function( event ) {
Expand All @@ -173,18 +173,18 @@ $.widget( "ui.autocomplete", {
// Replicate some key handlers to allow them to repeat in Firefox and Opera
var keyCode = $.ui.keyCode;
switch ( event.keyCode ) {
case keyCode.PAGE_UP:
this._move( "previousPage", event );
break;
case keyCode.PAGE_DOWN:
this._move( "nextPage", event );
break;
case keyCode.UP:
this._keyEvent( "previous", event );
break;
case keyCode.DOWN:
this._keyEvent( "next", event );
break;
case keyCode.PAGE_UP:
this._move( "previousPage", event );
break;
case keyCode.PAGE_DOWN:
this._move( "nextPage", event );
break;
case keyCode.UP:
this._keyEvent( "previous", event );
break;
case keyCode.DOWN:
this._keyEvent( "next", event );
break;
}
},
input: function( event ) {
Expand Down Expand Up @@ -577,7 +577,7 @@ $.widget( "ui.autocomplete", {
return;
}
if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
this.menu.isLastItem() && /^next/.test( direction ) ) {
this.menu.isLastItem() && /^next/.test( direction ) ) {

if ( !this.isMultiLine ) {
this._value( this.term );
Expand Down
4 changes: 2 additions & 2 deletions wp-includes/js/jquery/ui/autocomplete.min.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions wp-includes/js/jquery/ui/button.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery UI Button 1.13.1
* jQuery UI Button 1.13.2
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
Expand Down Expand Up @@ -41,7 +41,7 @@
"use strict";

$.widget( "ui.button", {
version: "1.13.1",
version: "1.13.2",
defaultElement: "<button>",
options: {
classes: {
Expand Down Expand Up @@ -240,8 +240,8 @@ $.widget( "ui.button", {

// Make sure we can't end up with a button that has neither text nor icon
if ( key === "showLabel" ) {
this._toggleClass( "ui-button-icon-only", null, !value );
this._updateTooltip();
this._toggleClass( "ui-button-icon-only", null, !value );
this._updateTooltip();
}

if ( key === "label" ) {
Expand Down Expand Up @@ -306,7 +306,7 @@ if ( $.uiBackCompat !== false ) {
this.options.text = this.options.showLabel;
}
if ( !this.options.icon && ( this.options.icons.primary ||
this.options.icons.secondary ) ) {
this.options.icons.secondary ) ) {
if ( this.options.icons.primary ) {
this.options.icon = this.options.icons.primary;
} else {
Expand Down
Loading

0 comments on commit 0fe6115

Please sign in to comment.