Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

CSS lineClamp disables text selection on Android

オープン
#136 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, react-native
領域
mobile

調査の方向性

リンクされた Snack を Android 上で React Native 0.75 以下を使って実行し、動作を再現してから、このリポジトリ内で CSS lineClamp の処理と Android Text へのマッピング箇所を特定します。選択可能なテキストが省略記号付きで切り詰められ、かつ選択可能なままであることを確認します。issue にはファイルまたはテストのパスが記載されていないため、関連する実装と回帰テストを特定する必要があります。

索引モデルが issue の本文から書いたものです。

説明

bug bug: react-native
Describe the issue

Root cause is a bug in React Native for Android (iOS works correctly). When userSelect:'auto' or selectable={true} is used in combination with numberOfLines on a React Native Text, Android clips overflow text rather than using the default ellipsizeMode:'tail'.

The workaround to restore the text overflow ellipsis is to set userSelect:'none' on the text for Android, which comes at the cost of text no longer being selectable.

Expected behavior

Text should be truncated with an ellipsis and remain user-selectable.

Steps to reproduce

React Native 0.75 or below. Android.

  • <html.span>
  • style of lineClamp
  • text is no longer selectable
Test case

https://snack.expo.dev/rIIwaSlqQ6cHKlcO2Vatn?platform=android

Additional comments

Android hack to fix this https://stackoverflow.com/questions/14691511/textview-using-spannable-ellipsize-doesnt-work/40505388#40505388

主要言語
JavaScript
スター
3.6k
フォーク
208
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

react/react-strict-dom のほかの issue

react/react-strict-dom の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。