Skip to content

iOS: scope singleSelection to leaf header menus#3980

Open
Jasleen-Kaur96 wants to merge 1 commit into
software-mansion:mainfrom
Jasleen-Kaur96:fix/ios-header-menu-single-selection-scope
Open

iOS: scope singleSelection to leaf header menus#3980
Jasleen-Kaur96 wants to merge 1 commit into
software-mansion:mainfrom
Jasleen-Kaur96:fix/ios-header-menu-single-selection-scope

Conversation

@Jasleen-Kaur96

Copy link
Copy Markdown

Summary

  • Fixes header menu behavior on iOS where selecting an item in one submenu clears the checkmark in a sibling submenu.
  • Root cause: UIMenuOptionsSingleSelection was applied to menus that contain submenus, causing UIKit to treat sibling submenu actions as a shared selection group.
  • This change scopes singleSelection to leaf menus only (menus without submenu children).

Fixes #3973.

Repro

Using unstable_headerRightItems, create a header menu with:

  • an inline parent submenu
  • two sibling submenus (for example Sort and Group)
  • each submenu contains action items with state: 'on' | 'off'
    Observed before:
  • selecting in submenu A removes checkmark in submenu B (and vice versa)
    Expected / after:
  • each submenu maintains its own selected checkmark independently

Test plan

  • Run app on iOS and open the header menu (...)
  • Open submenu A (e.g. Sort) and select an option
  • Open submenu B (e.g. Group) and select an option
  • Verify both submenus keep their own checkmark state
  • Swap submenu order in config and verify behavior remains correct

Environment

  • iOS: 26.3
  • Device: iPhone 17 Pro

@kligarski kligarski requested a review from kmichalikk May 7, 2026 12:43
@kmichalikk

Copy link
Copy Markdown
Contributor

Hi @Jasleen-Kaur96
Thanks for the PR but I'm afraid that we'll not proceed here. The hasMenu checking may be incorrect in some cases. From what I can see, for native iOS having singleSelection on parent menu gets this exact behavior of selecting only one element within all child menus. We'll keep investigating but this issue will probably end up with default values change at most.

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.

unstable_headerRightItems: state: 'on' checkmark not displayed for items in the second of two sibling nested submenus

2 participants