Skip to content

fix(ios): deliver long presses on modern tab bars - #587

Open
thiagobrez wants to merge 1 commit into
mainfrom
codex/duo-tab-long-press
Open

thiagobrez wants to merge 1 commit into
mainfrom
codex/duo-tab-long-press

Conversation

@thiagobrez

@thiagobrez thiagobrez commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

PR Description

Long presses on modern iOS tab bars select a tab but do not deliver the expected tabLongPress event. Their buttons live outside the legacy UITabBar hierarchy, and UIKit expands and duplicates them during its native hold animation.

Observe touches from the tab controller's view, recognize modern and legacy tab buttons, and capture the route when the touch begins. Resolve vertical and horizontal order (including RTL), ignore the system More destination, and allow UIKit's gestures to continue. Reuse the recognizer while refreshing its callback.

Fixes #573.

How to test?

Open Native Bottom Tabs from Chat and hold Article for one second. Its callback changes the label to New Article. Verify normal Chat selection still works and Contacts still prevents selection.

Verified with agent-device 0.20.10 on:

  • iPhone Duo / iOS 27.1: right vertical tabs and both landscape orientations, including left vertical tabs.
  • iPhone 17 Pro / iOS 26.5: horizontal LTR and RTL tabs. RTL was tested using a temporary example configuration, then restored.

Native Xcode build and lint pass. Workspace tests and typecheck pass on the common upstream base. UIKit tab-button class inspection remains an implementation dependency, as in the previous recognizer.

Screenshots

Before — hold selects Article without its callback After — callback changes the label to New Article
02-long-press-before-no-callback.mp4
02-long-press-after-callback.mp4

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.

[iOS] Tabs don't fire tabLongPress event on iOS 26

1 participant