Opened 5 years ago
Closed 5 years ago
#48643 closed defect (bug) (fixed)
Twenty Twenty: the menu on a mobile device becomes responsive after tapping a few times and switching pages
Reported by: | smatt33 | Owned by: | |
---|---|---|---|
Milestone: | 5.4 | Priority: | normal |
Severity: | normal | Version: | 5.3 |
Component: | Bundled Theme | Keywords: | 2nd-opinion |
Focuses: | ui, javascript | Cc: |
Description
Hello!
I have found a problem in the theme Twenty Twenty. I can replicate this both on my website and on the demo of the theme in the WordPress gallery, both in Chrome for Android and for the desktop (using the developer tools and simulating a mobile device).
Fundamentally, if you tap multiple times the mobile menu, then tap a page, then go back to the home and keep tapping multiple times on the menu button, at a certain point the menu will become unresponsive and the menu will not show up anymore.
The Javascript console shows the following error:
"Uncaught TypeError: Cannot read property 'classList' of null
at index.js?ver=1.0:83
at index.js?ver=1.0:85"
The culprit seems to be line 83:
" document.body.classList.add( 'touch-enabled' );"
Unfortunately, I don't know how to fix this, so my knowledge stops here. However, I hope this can be fixed soon, as it makes Twenty Twenty unreliable.
Related to and possibly a duplicate of #48601