#56274 closed defect (bug) (invalid)
Twenty Twenty-Two: Linking to an element on the same page does not work in the mobile menu
Reported by: | juhosa | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.0 |
Component: | Bundled Theme | Keywords: | |
Focuses: | Cc: |
Description
Running WordPress version 6.0.1
Steps to reproduce:
- Install WordPress, use the default Twenty twenty-two theme
- Create a page, add some ipsum lorem to give length to the page, add a link to an element at the bottom of the page (#news for example), set this page as the home page from Reading settings
- Create a menu item that links to your element on the page (#news in this example)
- View the page on your mobile device or by using mobile view on your browser
- Click/tap the mobile menu, click/tap on the #news link
Expected behaviour: the menu closes and the page scrolls to the relevant element (the one with the #news anchor)
What happens instead: The menu does not close when you click the link and when you close the menu the view returns to the top of the page
I have a working (non-working?) example on my website if this explanation is not clear enough. I noticed that when you click the link in mobile it actually scrolls to the proper place, but when you close the menu it returns to the top of the page. I did this by setting background: none; on the menu div and testing it.
Change History (3)
Note: See
TracTickets for help on using
tickets.
I think this has been fixed in 6.1, at least on one site which I upgraded to 6.1 from 6.01 the issue seems to have gone away.