fix(touch): harden long-press for iOS (#199) #440
Merged
jared
merged 1 commits from 2026-10-20 20:47:19 -04:00
fix/ios-long-press into lotus
No Reviewers
Labels
Clear labels
a11y
area: appearance
area: auth-session
area: build-ci
area: calls
area: desktop
area: media
area: messaging
area: mobile
area: moderation
area: navigation
area: notifications
area: settings
area: threads
bug
dependencies
docs
duplicate
enhancement
help wanted
invalid
needs-human-review
performance
planning
priority: critical
priority: high
priority: low
priority: medium
qa
question
research
security
tech-debt
ux
wontfix
Accessibility: keyboard, screen reader, contrast, motion
Client area: appearance
Client area: auth-session
Client area: build-ci
Client area: calls
Client area: desktop
Client area: media
Client area: messaging
Client area: mobile
Client area: moderation
Client area: navigation
Client area: notifications
Client area: settings
Client area: threads
Something is not working
Third-party package versions and advisories
README / LOTUS_* docs wrong or missing
This issue or pull request already exists
New feature
Need some help
Something is wrong
Re-render storms, leaks, heavy work on hot paths
Data loss, security hole, or crash on a main path
Broken feature or serious usability problem
Minor issue or polish
Wrong behaviour in an edge case or notable degradation
Manual QA: shipped, needs a human in a real environment
More information is needed
XSS, unsafe URLs, data leaks, auth/session
Code health, dead code, fragile patterns
Usability or visual inconsistency
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: LotusGuild/cinny#440
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Refs #199 and #166. It doesn't close them: per the owner's note they close together after a real-iPhone check.
Decision (owner, 2026-10-20): keep long-press → bottom sheet as the touch path, with nothing added per message, and harden it for iOS.
Why iOS was unreliable: a long-press on iOS belongs to the system. On a link or image it opens the callout or preview, and on text it starts the selection loupe at about 500 ms. Both race the 450 ms press, and often win.
Changes
useLongPress(touch screens only): its handlers adddata-touch-actionsto the message row, and the pressed row getsdata-pressingfrom touch-down until the finger lifts. The attribute is set on the DOM directly, so no re-render. It stays set after the sheet opens, so the selection can't start under a finger that's still down.room/message/styles.css.ts:[data-touch-actions] { -webkit-touch-callout: none };[data-touch-actions][data-pressing] { user-select: none }, so text selection is off only during the press.Verified (Chromium iPhone 14 emulation, real touch events over CDP; T = finger down):
The served stylesheet contains
-webkit-touch-callout: none(Chromium doesn't implement the property, so only Safari applies it).Still needed: a real iPhone check (Safari and the installed PWA) of long-press on plain text, a link and an image.
🤖 Generated with Claude Code
https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5