WordPress/wp-content/themes/twentytwentyone/assets/js
audrasjb 190350ecea Twenty Twenty-One: Refine primary-navigation.js behavior for anchor links.
This changeset fixes a bug where clicking on an anchor link in the content changes the state of the button that opens and closes the responsive menu. It adds a conditional to check if the clicked anchor link is inside the primary navigation menu (`#site-navigation`), in order to prevent content anchor links from changing the state of the button.

Known limitations: The state of the button is not reset when the browser is resized. If a menu anchor link is first clicked while on desktop width, and the browser width is reduced, the menu button will show the text "Close" even though the menu is not opened.

Props andreaboe, sabernhardt, poena, afercia, chaion07, cu121, mukesh27.
Fixes #53331.

Built from https://develop.svn.wordpress.org/trunk@55124


git-svn-id: http://core.svn.wordpress.org/trunk@54657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-24 12:59:10 +00:00
..
customize-helpers.js Twenty Twenty-One: Add missing documentation for some filters. 2021-07-02 08:57:57 +00:00
customize-preview.js Twenty Twenty-One: Sync the latest changes for 5.6 RC2. 2020-12-01 19:09:05 +00:00
customize.js Twenty Twenty-One: Sync the latest changes for 5.6 RC1. 2020-11-17 19:00:08 +00:00
dark-mode-toggler.js Twenty Twenty-One: Prevent Dark Mode related JavaScript error. 2021-02-09 14:56:04 +00:00
editor-dark-mode-support.js Twenty Twenty-One: Correct @since inline documentation tags. 2020-12-17 14:57:07 +00:00
editor.js Twenty Twenty-One: Merge the latest changes changes from GitHub for Beta 4. 2020-11-12 18:36:15 +00:00
palette-colorpicker.js Twenty Twenty-One: Add missing documentation for some filters. 2021-07-02 08:57:57 +00:00
polyfills.js Twenty Twenty-One: Add missing documentation for some filters. 2021-07-02 08:57:57 +00:00
primary-navigation.js Twenty Twenty-One: Refine primary-navigation.js behavior for anchor links. 2023-01-24 12:59:10 +00:00
responsive-embeds.js Twenty Twenty-One: Correct @since inline documentation tags. 2020-12-17 14:57:07 +00:00
skip-link-focus-fix.js Twenty Twenty-One: Add missing documentation for some filters. 2021-07-02 08:57:57 +00:00