Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Prevent Esc Executing the Change Event in Category widget Dropdown
  • Loading branch information
shail-mehta committed Sep 22, 2025
commit c9d2fa8b27aecb9af42ff9be95ec4b3e65d7d00d
4 changes: 2 additions & 2 deletions packages/block-library/src/categories/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function build_dropdown_script_block_core_categories( $dropdown_id ) {
ob_start();
?>
<script>
(function() {
( function() {
var dropdown = document.getElementById('<?php echo esc_js( $dropdown_id ); ?>'), lastKey;

function onSelectChange(e) {
Expand Down Expand Up @@ -135,7 +135,7 @@ function onSelectChange(e) {
})();
</script>
<?php
return wp_get_inline_script_tag(str_replace(array('<script>', '</script>'), '', ob_get_clean()));
return wp_get_inline_script_tag( str_replace( array ('<script>', '</script>' ), '', ob_get_clean()));
}

/**
Expand Down