[wp-trac] [WordPress Trac] #53331: Twenty Twenty-One: Bug in primary-navigation.js

WordPress Trac noreply at wordpress.org
Tue Jun 21 06:04:19 UTC 2022


#53331: Twenty Twenty-One: Bug in primary-navigation.js
---------------------------+-----------------------------
 Reporter:  andreaboe      |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Future Release
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  needs-patch    |     Focuses:  javascript
---------------------------+-----------------------------

Comment (by poena):

 == Test instructions

 In the WordPress admin backend, navigate to Appearance > Menus
 Select a menu that shows in the "Primary Menu" Display Location. If there
 is no new menu, create a new one and assign it to the "Primary Menu" under
 Display Location
 Create a new post or page. In the content, add text with an anchor link
 such as #test.
 Go to the front of the website and open the post or page that you created.
 Reduce the browser window width until the button that opens the responsive
 menu shows.
 Click on the anchor link in the content.
 See that the menu button changes and shows the text "Close" even though
 the menu is not open.


 == Test results
 I am able to reproduce this using:
 WordPress 6.0
 Windows 10
 Chrome version 102.0.5005.115

 ----
 If I remember correctly, the JavaScript code that closes the menu when an
 anchor link is clicked was added to
 support using on-page anchor links in the primary navigation.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53331#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list