diff --git a/src/wp-content/themes/twentytwenty/assets/js/index.js b/src/wp-content/themes/twentytwenty/assets/js/index.js
index 0a64fd98ba..5317920adc 100644
|
a
|
b
|
twentytwenty.toggles = { |
| 632 | 632 | if ( event.key === 'Escape' ) { |
| 633 | 633 | document.querySelectorAll( '*[data-untoggle-on-escape].active' ).forEach( function( element ) { |
| 634 | 634 | if ( element.classList.contains( 'active' ) ) { |
| 635 | | element.click(); |
| | 635 | if ( element.classList.contains( 'search-modal' ) ) { |
| | 636 | document.querySelectorAll( '.search-toggle', function( element ) { |
| | 637 | // element.setAttribute( 'aria-expanded', false ); |
| | 638 | } ); |
| | 639 | } else { |
| | 640 | element.click(); |
| | 641 | } |
| 636 | 642 | } |
| 637 | 643 | } ); |
| 638 | 644 | } |
diff --git a/src/wp-content/themes/twentytwenty/template-parts/modal-search.php b/src/wp-content/themes/twentytwenty/template-parts/modal-search.php
index 32f9b51a0c..50dc7dc81b 100644
|
a
|
b
|
|
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | ?> |
| 11 | | <div class="search-modal cover-modal header-footer-group" data-modal-target-string=".search-modal"> |
| | 11 | <div class="search-modal cover-modal header-footer-group" data-modal-target-string=".search-modal" data-untoggle-on-escape="true"> |
| 12 | 12 | |
| 13 | 13 | <div class="search-modal-inner modal-inner"> |
| 14 | 14 | |