Make WordPress Core

Ticket #53951: 53951-2.diff

File 53951-2.diff, 1.4 KB (added by alexstine, 4 years ago)
  • src/wp-content/themes/twentytwenty/assets/js/index.js

    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 = { 
    632632                        if ( event.key === 'Escape' ) {
    633633                                document.querySelectorAll( '*[data-untoggle-on-escape].active' ).forEach( function( element ) {
    634634                                        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                                                }
    636642                                        }
    637643                                } );
    638644                        }
  • src/wp-content/themes/twentytwenty/template-parts/modal-search.php

    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  
    88 */
    99
    1010?>
    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">
    1212
    1313        <div class="search-modal-inner modal-inner">
    1414