react / react/react-native

flexWrap wrapping unexpectedly with alignItems: 'flex-end'

Aperta
#48,527 16 commenti 2 reazioni 1 assegnatario Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

Description

This bug/issue seems to be screen size dependent. In the provided example with the used text the incorrect wrapping is visible on the Pixel 7 screen. The same issue is also on ios, but there I did not test which text + device causes the too early overflow. When the text is changed (shortened or lengthened) the overflow disappears until the correct overflow occurs. Maybe this has something to do with the way the Views are nested, but I still don't understand how this is expected behaviour.

Pixel 7 the text wraps, but it should not yet and the backgroundColor is also only displayed on the top Text.

Bildschirmfoto 2025-01-08 um 11 27 57

Pixel 4 the same text does not wrap:

Bildschirmfoto 2025-01-08 um 11 26 01
Steps to reproduce
  1. Locally run the code provided in the expo snack using a pixel 7 simulator or test it directly in expo snack
React Native Version

0.76.1

Affected Platforms

Runtime - Android

Output of npx react-native info
System:
  OS: macOS 14.6
  CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Memory: 10.96 GB / 64.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 23.3.0
    path: /usr/local/bin/node
  Yarn: Not Found
  npm:
    version: 10.9.0
    path: /usr/local/bin/npm
  Watchman:
    version: 2024.12.02.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2412.12266719
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.13
    path: /usr/bin/javac
  Ruby:
    version: 3.3.5
    path: /usr/local/opt/ruby/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.0
    wanted: 15.0.0
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.1
    wanted: ^0.76.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true
Stacktrace or Logs
No crash/failure occurs
Reproducer

https://snack.expo.dev/@alex_p8/gnarly-orange-ramen

Screenshots and Videos
Bildschirmfoto 2025-01-08 um 11 27 57

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.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.