Skip to content

Twenty Eleven: Open submenus on the first tap on touch devices - #15006

Open
R1shabh-Gupta wants to merge 2 commits into
WordPress:trunkfrom
R1shabh-Gupta:fix/38982-twentyeleven-touch-submenus
Open

R1shabh-Gupta wants to merge 2 commits into
WordPress:trunkfrom
R1shabh-Gupta:fix/38982-twentyeleven-touch-submenus

Conversation

@R1shabh-Gupta

Copy link
Copy Markdown

On touch devices, tapping a parent item in Twenty Eleven's main menu opens its link right away, so the submenu can't be used. This happens mostly on Android. This PR adds a small script so the first tap on a menu item with a submenu opens it, and a second tap follows the link.

Testing instructions

  1. Activate Twenty Eleven and assign a primary menu with nested items (a parent with a child, and a child with its own child).
  2. On a touch device, tap a parent item: its submenu opens and the page doesn't change.
  3. Tap the same item again: its link opens.
  4. Check that nested submenus open, that tapping outside the menu closes them, and that after pressing Back the menu is closed.

I tested it on my Pixel phone (Android, Chrome) and on iOS Safari in the Simulator.

Trac ticket: https://core.trac.wordpress.org/ticket/38982

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Code Review


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@R1shabh-Gupta
R1shabh-Gupta marked this pull request as ready for review October 30, 2026 21:27
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core Committers: Use this line as a base for the props when committing in SVN:

Props rishabhwp.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant