diff --git a/wp-content/themes/twentytwenty/assets/js/index.js b/wp-content/themes/twentytwenty/assets/js/index.js index b6919261e8..c6f7a0a909 100644 --- a/wp-content/themes/twentytwenty/assets/js/index.js +++ b/wp-content/themes/twentytwenty/assets/js/index.js @@ -137,6 +137,17 @@ twentytwenty.coverModals = { var target = event.target; var modal = document.querySelector( '.cover-modal.active' ); + // if target onclick is with # within the href attribute + if ( event.target.tagName.toLowerCase() === 'a' && event.target.hash.includes( '#' ) && modal !== null ) { + // untoggle the modal + this.untoggleModal( modal ); + // wait 550 and scroll to the anchor + setTimeout( function() { + var anchor = document.getElementById( event.target.hash.slice( 1 ) ); + anchor.scrollIntoView(); + }, 550 ); + } + if ( target === modal ) { this.untoggleModal( target ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 9b31645e18..bcc1004c99 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-47783'; +$wp_version = '5.5-alpha-47784'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.