fix(app): allow partial text selection on the markdown copy screen - #1449
Open
chphch wants to merge 1 commit into
Open
fix(app): allow partial text selection on the markdown copy screen#1449chphch wants to merge 1 commit into
chphch wants to merge 1 commit into
Conversation
The long-press "copy markdown" screen (text-selection.tsx) rendered the
raw markdown in a read-only <TextInput editable={false}>. On Android a
non-editable TextInput cannot be selected at all, so the only way to copy
was the "Copy All" header button — there was no way to copy just part of
the text.
Render the source as a selectable <Text> instead, which brings up the
native selection handles + copy toolbar on both Android and iOS, so users
can drag-select and copy a portion. The "Copy All" header button is
unchanged.
Addresses slopus#841 (the text-selection screen specifically — partial selection
now works there; inline per-paragraph selection on the message itself is
still tracked by the issue).
chphch
force-pushed
the
fix/841-android-text-selection
branch
from
July 26, 2026 22:44
8dd26e7 to
bedffa7
Compare
Contributor
Author
|
Rebased onto current Only the import line conflicted:
|
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.
The long-press "copy markdown" screen (
text-selection.tsx) rendered the raw markdown in a read-only<TextInput editable={false}>. On Android a non-editableTextInputis not selectable at all, so the only copy path was the "Copy All" header button — there was no way to grab just a paragraph or a single line. This swaps it for a selectable<Text>, which brings up the native selection handles + copy toolbar on Android and iOS, so the markdown source is now partially selectable and copyable. The "Copy All" header button is unchanged.This addresses the most acute part of #841 ("markdownCopyV2 only copies entire response"): once you're on the text-selection page you can now copy a portion instead of all-or-nothing. The broader ask in #841 — inline arbitrary selection directly on the rendered message and touch-visible per-block copy buttons — is left to a follow-up, since
markdownCopyV2intentionally disables inline span selection (so the native copy menu doesn't race the long-press gesture).Verification
This is Android/iOS-native selection behaviour — the broken state (a non-editable
TextInputbeing unselectable) only manifests on a touch device; on web the text is always selectable, so the web test harness can't exercise it. Checked:pnpm typecheckclean, and the change is the documented RN pattern for selectable read-only text (<Text selectable>). On-device repro: long-press a message → "copy markdown" screen → drag the selection handles over part of the text → native Copy.