react / react/react-native

Android - Composer - Previous text is cut off after creating next line

Aperta
#45,522 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Issue: Author Provided Repro Platform: Android
Lingua principale
C++
Stelle
127k
Fork
25.3k
Merge medio
1g 23h
PR unite (30g)
4

Descrizione

Description

When the TextInput component is controlled and the multiline prop is set to true, the text gets cut off after writing some text and adding a new line. However, when a new character is added, the text displays correctly.

Steps to reproduce
  1. Add a TextInput
  2. set the value prop and onChangeText
  3. set as true the multiline prop
  4. Add some text
  5. Add a new line, tapping the Enter button on the keyboard
  6. The text is cut off
React Native Version

0.74.3

Affected Platforms

Runtime - Android

Output of npx react-native info
System:
  OS: macOS 13.6.7
  CPU: (10) arm64 Apple M1 Pro
  Memory: 41.83 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.14.0
    path: ~/.nvm/versions/node/v20.14.0/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.7.0
    path: ~/.nvm/versions/node/v20.14.0/bin/npm
  Watchman:
    version: 2023.11.27.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/eduardograciano/.gem/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.4
      - iOS 16.4
      - macOS 13.3
      - tvOS 16.4
      - watchOS 9.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10671973
  Xcode:
    version: 14.3.1/14E300c
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.7.5
    path: /Users/eduardograciano/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: true
Stacktrace or Logs
-
Reproducer

https://github.com/gedu/android-composer-reproducer

Screenshots and Videos

https://github.com/user-attachments/assets/67a44e6e-c8bc-470a-b29b-48b7846b1d36

Screenshot 2024-07-18 at 15 56 24

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia eseguendo l’android-composer-reproducer collegato con React Native 0.74.3 e prova un TextInput multilinea controllato su Android. Traccia il comportamento di TextInput a partire dalla riproduzione e verifica che il testo esistente rimanga visibile immediatamente dopo l’inserimento di una nuova riga, senza richiedere un altro carattere.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
react-native
Ambito
mobile
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.