Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#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's profile 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:

  1. Install WordPress, use the default Twenty twenty-two theme
  2. 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
  3. Create a menu item that links to your element on the page (#news in this example)
  4. View the page on your mobile device or by using mobile view on your browser
  5. 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)

#1 @sabernhardt
2 years ago

  • Component changed from Themes to Bundled Theme
  • Summary changed from Linking to an element on the same page does not work in the mobile menu in the Twenty twenty-two theme to Twenty Twenty-Two: Linking to an element on the same page does not work in the mobile menu

#2 @juhosa
2 years ago

  • Resolution set to invalid
  • Status changed from new to closed

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.

#3 @desrosj
2 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.