Make sure menu clicks and touches work well on desktop and mobile.

Review Request #14823 — Created Feb. 17, 2026 and updated

Information

Review Board
release-7.1.x

Reviewers

Over time, we encountered various bugs with menu and menu items and
applied different fixes. This lead to having a few different areas that
handled click and touch events for menus. We had a specialized
MenuItemActionView that at the time that it was added, helped with
mobile interactions. However, now the MenuActionView sets up click
handlers for its menu items, so the MenuItemActionView handlers aren't
needed anymore. And keeping both was leading to double Ship Its to
appear when tapping the Ship It menu action on mobile, and was
preventing the menus from closing after an item click/touch. This
change addresses this by removing the specialized click/touch handlers.

This also fixes a similar issue in the archive menu, where tapping on
the menu icon on mobile would activate the archive action. Instead, we
want mobile taps to just open the archive menu. This change fixes that
by getting rid of the custom touch handlers ArchiveMenuActionView and
instead letting MenuActionView handle it.

I also found a small error where we were passing a class selector to
JQuery's hasClass instead of the class name.

  • Ran JS unit tests.
  • Interacted with all the menus on the review request page and made
    sure all actions worked and menus opened/closed properly (unified
    banner menu, archive menu, close menu, update menu)
  • Interacted with the profile menu, support menu and follow menu.
  • Verified that the double Ship It bug was gone.
  • Verified that the archive menu bug was gone.
Summary ID
Make sure menu clicks and touches work well on desktop and mobile.
Over time, we encountered various bugs with menu and menu items and applied different fixes. This lead to having a few different areas that handled click and touch events for menus. We had a specialized `MenuItemActionView` that at the time that it was added, helped with mobile interactions. However, now the `MenuActionView` sets up click handlers for its menu items, so the `MenuItemActionView` handlers aren't needed anymore. And keeping both was leading to double Ship Its to appear when tapping the Ship It menu action on mobile, and was preventing the menus from closing after an item click/touch. This change addresses this by removing the specialized click/touch handlers. This also fixes a similar issue in the archive menu, where tapping on the menu icon on mobile would activate the archive action. Instead, we want mobile taps to just open the archive menu. This change fixes that by getting rid of the custom touch handlers `ArchiveMenuActionView` and instead letting `MenuActionView` handle it. I also found a small error where we were passing a class selector to JQuery's `hasClass` instead of the class name.
6e14d4e993f07ea9de8ba85223e8df36760dc161
Checks run (2 succeeded)
flake8 passed.
JSHint passed.