Skip to content

Commit edaebf6

Browse files
committed
This wasn't supposed to stay in here.
1 parent 1ff250f commit edaebf6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/wp-includes/blocks/categories.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,12 @@ function build_dropdown_script_block_core_categories( $dropdown_id ) {
103103
<script>
104104
( function() {
105105
var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' );
106-
function onCatChange(e) {
107-
if ( 'keyup' === e.type && 'Escape' !== e.key ) {
108-
return;
109-
}
106+
function onCatChange() {
110107
if ( dropdown.options[ dropdown.selectedIndex ].value !== -1 ) {
111108
location.href = "<?php echo esc_url( home_url() ); ?>/?" + dropdown.name + '=' + dropdown.options[ dropdown.selectedIndex ].value;
112109
}
113110
}
114-
dropdown.addEventListener( 'change', onCatChange(e) );
111+
dropdown.onchange = onCatChange;
115112
})();
116113
</script>
117114
<?php

0 commit comments

Comments
 (0)