Skip to content

fix(android): keep read-only text selectable - #21

Merged
farfromrefug merged 1 commit into
mainfrom
fix/editable-keeps-selectable
Nov 26, 2026
Merged

farfromrefug merged 1 commit into
mainfrom
fix/editable-keeps-selectable

Conversation

@farfromrefug

Copy link
Copy Markdown

Summary

  • editable=false turned focus, click and long click off even with selectable=true (the default), so read-only text could not be selected. It now stays interactive while it is selectable.
  • The selectable setter targeted nativeViewProtected, the wrapping layout of a view like the one of ui-textview, not the EditText. It now uses nativeTextViewProtected.
  • selectable is added to the typings.

Testing

  • index.android.spec.ts: 4 new vitest cases, red before the change (3 failing on the assertions), green after. The repo's vitest config does not load here (@nx/vite missing), so I ran them with a throwaway config.
  • Checked on an Android emulator with ui-textview in a bottom sheet: long press selects read-only text, also after toggling editable on and off.

🤖 Generated with Claude Code

`editable=false` turned focus, click and long click off even with `selectable=true`, so read-only
text could not be selected. The `selectable` setter also targeted `nativeViewProtected`, which is
the wrapping layout of a view like the one of ui-textview, not the EditText.

Add `selectable` to the typings.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@farfromrefug
farfromrefug marked this pull request as ready for review November 26, 2026 09:12
@farfromrefug
farfromrefug merged commit 401c253 into main Nov 26, 2026
0 of 2 checks passed
@farfromrefug
farfromrefug deleted the fix/editable-keeps-selectable branch November 26, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant