[wp-trac] [WordPress Trac] #63613: Twenty Twenty-One: menu toggle is not responsive until after "load" event
WordPress Trac
noreply at wordpress.org
Mon Jul 7 18:49:17 UTC 2025
#63613: Twenty Twenty-One: menu toggle is not responsive until after "load" event
--------------------------------------+--------------------------
Reporter: gernberg | Owner: westonruter
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.8.2
Component: Bundled Theme | Version: 5.6
Severity: minor | Resolution: fixed
Keywords: fixed-major dev-reviewed | Focuses: javascript
--------------------------------------+--------------------------
Changes (by audrasjb):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"60423" 60423]:
{{{
#!CommitTicketReference repository="" revision="60423"
Twenty Twenty-One: Add nav menu toggle behaviors at `DOMContentLoaded`
instead of at the `load` event.
The `load` event (on `window`) fires after all resources on a page have
been loaded, including images. This means that
on a slow connection, the mobile nav menu button may be rendered yet
unresponsive to taps between when it first appears
and when the page has fully loaded. This is rectified by switching to the
`DOMContentLoaded` event so that the nav menu
behaviors are attached as soon as the DOM has fully loaded.
Reviewed by audrasjb.
Merges [60352] to the 6.8 branch.
Props gernberg, westonruter, sabernhardt.
Fixes #63613.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63613#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list