fix: scroll iOS pager native headers from drags that start on items - #115
Merged
Merged
Conversation
…tems The CollapsiblePagerView native tab bar and native sub-header are horizontal scroll views whose items are UIButtons, and both deliver touches without delay. An item starts tracking on touch-down, and UIScrollView does not cancel UIControl touches by default, so a drag that began on an item never scrolled the bar. Only a drag that began in the gap between two items did. The shared headers are hosted inside the page's NativeList collection view. Its default delaysContentTouches = true held touch-down back for about 150 ms, long enough for the header pan to be recognized first. 3.0.142 turned that delay off for quick-tap row feedback and exposed the bug. - return YES from touchesShouldCancelInContentView: for UIControl views, as NativeList's collection view does, so a drag cancels the item's touch and scrolls the bar while a tap still presses the item Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bump all 40 publishable packages to 3.0.145 and record the iOS pager-view native header scroll fix in the changelog. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
5 tasks
originalix
approved these changes
Sep 17, 2026
Contributor
|
@codex review |
Contributor
|
@codex security review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CollapsiblePagerViewnative tab bar and native sub-header scroll again when a drag starts on a tab or category item. Since 3.0.142, only a drag that began in the gap between two items scrolled them. On app-monorepo's Market home, these are the pager tab bar and the Stocks category chips.RNCCollapsiblePagerViewComponentView.mmchanges. Props, JS and Android are unchanged.Root cause
RNCCollapsiblePagerHorizontalScrollViews. Their items areUIButtons, and they setdelaysContentTouches = NO(since feat: add native Market pager headers and stabilize lists #99), so an item starts tracking on touch-down.touchesShouldCancelInContentView:whether it may take the touch from the tracking view. The default isNOforUIControl, so the scroll view stops dragging and nothing moves.attachSharedHeadersToScrollView:adds the header host as a subview). Up to 3.0.141 that collection view kept UIKit's defaultdelaysContentTouches = true. Touch-down reached the header buttons only after about 150 ms, so a horizontal drag was recognized first, the delayed touch was dropped, and the button never tracked.UIControlcancel rule. The nested header scrollers had no such rule and now lost every drag that started on an item.Change
RNCCollapsiblePagerHorizontalScrollViewoverridestouchesShouldCancelInContentView:and returnsYESforUIControlviews, the same ruleNativeListCollectionViewuses. Other views keepsuper's behavior. The only controls in these scrollers are the item buttons.UIControlEventTouchUpInsideand selects the item.alwaysBounceHorizontal = YESand the default deceleration.Verification
app-monorepo
x(a89da5cde1, native modules 3.0.144) on an iPhone 17 Pro simulator (iOS 26.5), Market home. Drags were injected with the simulator control tool. The pager's own[CollapsiblePager]debug lines were read from the app's OneKeyLog file.Baseline, remote CI shell for 3.0.144:
native-tab-axis owner=primary|secondary … result=1(the pan may begin) and nonative-tab-scroll … phase=beginafter it.A/B with one
dev-shell --shell localbuild. Temporary launch-argument flags switched each variant, and the same swipe started on a button:delaysContentTouchesfalsetouchesShouldCancelInContentView view=UIButton result=0, no scrolltruefalseresult=1, scrolls: tab bar to 132 pt, chips to 349 ptThe final check used a rebuild with this exact file and no flags; the installed
OneKeyWallet.debug.dylibcontains-[RNCCollapsiblePagerHorizontalScrollView touchesShouldCancelInContentView:]:ScrollView) scroll as before.gesture-owner=list).alwaysBounceHorizontal = YES.Not covered: a real device, RTL layouts and dark mode. Android does not use this code path.
Release
aa32a91a5139ec9322Published from this branch with the
latestdist-tag in run 35229930801. The run's registry check passed, andnpm viewreports 3.0.145 aslatestfor all 40 packages. The downloaded@onekeyfe/react-native-pager-view@3.0.145tarball'sios/RNCCollapsiblePagerViewComponentView.mmis byte-identical toaa32a91a5, and to the file verified on the simulator.🤖 Generated with Claude Code