Skip to content

Commit f0237ed

Browse files
committed
Use onSelectChange instead of onCatChange
1 parent b0327b2 commit f0237ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-includes/widgets/class-wp-widget-categories.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function widget( $args, $instance ) {
9898
<script>
9999
( ( dropdownId ) => {
100100
const dropdown = document.getElementById( dropdownId );
101-
function onCatChange() {
101+
function onSelectChange() {
102102
setTimeout( () => {
103103
if ( 'escape' === dropdown.dataset.lastkey ) {
104104
return;
@@ -120,7 +120,7 @@ function onClick() {
120120
}
121121
dropdown.addEventListener( 'keyup', onKeyUp );
122122
dropdown.addEventListener( 'click', onClick );
123-
dropdown.addEventListener( 'change', onCatChange );
123+
dropdown.addEventListener( 'change', onSelectChange );
124124
})( <?php echo wp_json_encode( $dropdown_id, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?> );
125125
</script>
126126

0 commit comments

Comments
 (0)