Skip to content

chore(ios): don't delay touchesEnded for the keyboard's tap in scroll views - #2748

Merged
oneo-me merged 2 commits into
nsgo-dev:mainfrom
Heyana:perf/ios-scrollview-touch-delay
Nov 29, 2026
Merged

oneo-me merged 2 commits into
nsgo-dev:mainfrom
Heyana:perf/ios-scrollview-touch-delay

Conversation

@Heyana

@Heyana Heyana commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Split out from #2716.

  • Sets delaysTouchesEnded = false on the keyboard-dismiss UITapGestureRecognizer in NsgoScrollView (internal/platform/ios/behavior.go), matching watcher, tracker and panGate.
  • Keeps UIScrollView's default delaysContentTouches, with a comment saying why.

Why delaysContentTouches stays on

The first commit turned it off to remove a ~150 ms tap delay, but taps aren't delayed: NSGo fires EventPress on touchesEnded (ios.go), and for a tap shorter than the delay UIScrollView delivers touchesBegan and touchesEnded together as the finger lifts. Only a held press's highlight waits. Turning it off would make every drag that starts on a pressable flash its press before the scroll cancels it, unlike UIKit's own lists. A maintainer's follow-up commit restores the default and drops the changelog fragment, since what's left isn't user-visible.

Verification

  • go tool nsgo check -target ios,macos -jobs 4 → 0 (first commit); go tool nsgo check -target ios -jobs 4 → 0 (follow-up)
  • iOS simulator, ad-hoc test (not committed): dragging up from a text field and from a pressable row inside a Scroll scrolls 190 pt with no press, same as on main.
  • Not covered: the highlight's timing on a device.

🤖 Claude Opus 5.5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oneo-me oneo-me changed the title perf(ios): disable UIScrollView delaysContentTouches to remove ~150ms tap delay chore(ios): don't delay touchesEnded for the keyboard's tap in scroll views Nov 29, 2026
@github-actions

Copy link
Copy Markdown

This pull request has no valid Local CI declaration for its head commit, so a maintainer audits it before merging:

  • the body has no <!-- local-ci --> block under ## Verification

Run the checks on the head commit, fill the block in the template, then push or edit the body: this label and comment update on their own.

@oneo-me
oneo-me enabled auto-merge (rebase) November 29, 2026 11:07
@oneo-me
oneo-me merged commit 39735f6 into nsgo-dev:main Nov 29, 2026
49 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation iOS local-ci-skipped size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants