Repository navigation
fix(mobile): iOS shell keeps WebKit text interaction on so page fields take text - #24270
Conversation
…s take text With isTextInteractionEnabled = false (#21589), a focused page textarea gets keydown but WebKit never inserts text: no beforeinput, no input, no caret. On the iOS OTA build the Claude Chat composer showed the keyboard and took no characters. Measured on an iPhone 17 Pro simulator, Release OTA build: text interaction on alone fixes it; the #23110 accessory and keyboard-observer changes are not involved. The page's user-select rule (previous commit) keeps WebKit's selection off its long presses. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…ion line A negative grep passes on any other spelling or a deleted file, and the Swift checks compile without WebKit, so neither can pin a WKWebView setting. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
|
There was a problem hiding this comment.
Important
The code change is correct, but the page rule this PR depends on is not yet on main, and the PR body describes it as unprefixed user-select: none. Unprefixed user-select has no stable Safari release, and this module's floor is iOS 15.1 — so please confirm the sibling page rule carries -webkit-user-select: none before merging.
Reviewed changes
- Drops the
isTextInteractionEnabled = falsesetting inMobileWebShellView.swift, restoring WebKit's default. With the flag off, a focused page field receivedkeydownbut WebKit never started a text-input session, so the iOS Claude Chat composer took no characters until background/resume. - Updates the adjacent comment to say the page's
user-select: noneis what keeps WebKit's selection assistant off long presses. - Removes the source-grep test added in the first commit; a
readFileSyncnegative match cannot pin aWKWebViewsetting, so dropping it is right.
⚠️ The replacement mitigation must use the -webkit- prefix to cover the iOS floor
This PR removes the only in-shell guard against WebKit's selection assistant and hands that job to the page's user-select rule, which is not yet on main and which the PR body describes as unprefixed user-select: none. Unprefixed user-select has no stable Safari/WebKit release in MDN browser-compat-data (safari is listed as preview; safari_ios only -webkit- since 3), while this module's floor is iOS 15.1. If the page rule ships only the unprefixed form, WebKit ignores it across the supported iOS range and the long-press actions #21589 fixed go dead again — the iOS 26.5 simulator evidence would not surface that gap. The repo's own convention is misleading here: src/renderer/src/assets/main.css uses bare user-select, which is fine for Electron/Chromium but not for the WKWebView page.
Technical details
# The page's long-press mitigation needs `-webkit-user-select` on iOS
## Affected sites
- `mobile/modules/orca-mobile-web-shell/ios/MobileWebShellView.swift:204` — the new comment asserts the page's `user-select: none` covers this; it should hold regardless of which iOS build renders the page.
- The page rule itself (from `mobile-page-hold-dictation`, not on `main` at review time) — wherever the body rule lands, it must pair the prefixed property.
- `src/renderer/src/assets/main.css` — bare `user-select: none` is the existing convention and would be copied into the page rule; it is ignored by older WebKit.
## Required outcome
- The page-level rule must include `-webkit-user-select: none` alongside `user-select: none`, with inputs, textareas, and the editor re-enabled via `-webkit-user-select: text` (not only the unprefixed form).
- Verify on an iOS 15/16 runtime, not solely the newest simulator, since that is the documented floor (`mobile/modules/orca-mobile-web-shell/ios/OrcaMobileWebShell.podspec:10`).
## Open question for the human
- Does the `mobile-page-hold-dictation` rule already carry the `-webkit-` prefix? The branch is not on the remote yet, so this review could not confirm it. The author-stated merge order (this PR after the page rule) is otherwise correct.DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 📝 WalkthroughWalkthroughThe view no longer disables WebKit text interaction. Updated comments state that page CSS Priority: ⬆️ High Merge Risk: 🔵 Low · up to Typing is enabled, but long presses on ordinary file-explorer text can still show WebKit’s selection UI. This is a bounded interaction regression; add the page-level selection rule while preserving editable fields before shipping, or explicitly accept it as a follow-up. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change restores normal text entry without changing the inspected session or navigation protections. Selection behavior now depends on the page version, however, and compatibility with the separately released page changes has not been established. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description explains the failure, cause, fix, dependency, release impact, and simulator testing. However, it omits required template sections, including ELI5, Why, Linked Issue, Visual Proof or an explicit N/A rationale, AI Disclosure, Review, Agent skill upstream boundary, Notes, and the Checklist. Resolution Add the missing required sections. Include an actual linked issue, provide before-and-after visual proof or write N/A with a reason, complete the testing and checklist items, address cross-platform and compatibility considerations, and complete the AI Disclosure, Review, and Agent skill upstream boundary sections as applicable.
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: c9d4baaf-b877-4457-8081-0df2117dcd8d
📒 Files selected for processing (1)
mobile/modules/orca-mobile-web-shell/ios/MobileWebShellView.swift
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

What
On the iOS OTA TestFlight build (0.0.52 build 2) the software keyboard comes up over the Claude Chat composer and typing puts nothing in it. Leaving the app and coming back makes it work.
Cause. The iOS shell's WebView sets
isTextInteractionEnabled = false, added in #21589 so a long press would reach the page instead of raising WebKit's selection loupe. With it off, WebKit deliverskeydownto a focused page textarea but never starts a text-input session: nobeforeinput, noinput, no caret, the value stays empty. Bisected on an iPhone 17 Pro simulator (iOS 26.5, release OTA build, two runs per arm): turning text interaction on fixes typing on the first open; the #23110 accessory-bar and keyboard-observer changes toggled off change nothing. The setting must be on before the focusing tap, so there is no page-side mitigation for shells already shipped. The native app's terminal WebView never set this flag, which is why the native build types.Fix. The line goes. What kept WebKit's selection off the page's long presses is now the page's own rule,
user-select: noneon the body with inputs, textareas and the editor selectable, which ships over the air in #24277 (native parity: React NativeTextis unselectable unlessselectable). Measured on the fixed build: typing and sending from the composer on first open, and a 600 ms hold on a worktree row still opens the page's action sheet with no Copy / Look Up / Translate callout.Merge order: after #24277 lands. Merged alone this brings back #21589's dead long presses on iOS.
Needs a new iOS shell release. Until it ships, typing into page fields stays broken on the iOS OTA build; the background-and-return workaround reproduces on the simulator.
Tests