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

WordPress Trac noreply at wordpress.org
Tue Jan 24 12:56:28 UTC 2023


#53331: Twenty Twenty-One: Bug in primary-navigation.js
------------------------------+-------------------------
 Reporter:  andreaboe         |       Owner:  audrasjb
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  6.2
Component:  Bundled Theme     |     Version:
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:  javascript
------------------------------+-------------------------
Changes (by audrasjb):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55124" 55124]:
 {{{
 #!CommitTicketReference repository="" revision="55124"
 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.
 }}}

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


More information about the wp-trac mailing list