react / react/react-native

TextInput placeholder in ANDROID 14 not respect fontFamily custom

Đang mở
#45,853 9 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Component: TextInput Issue: Author Provided Repro Platform: Android
Ngôn ngữ chính
C++
Star
127k
Fork
25.3k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
4

Mô tả

Description

When installing custom font like Robot in device and configuration, the placeholder not applying the font the other components working but specific placeholder of TextInputs not working

Steps to reproduce
  • Configure font Roboto
  • Define style fontFamili in TextInput
    PS: only crash in Android 14
React Native Version

0.73.0

Affected Platforms

Runtime - Android

Output of npx react-native info
System:
  OS: Linux 5.4 Linux Mint 20.3 (Una)
  CPU: (8) x64 Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
  Memory: 8.01 GB / 23.29 GB
  Shell:
    version: 5.0.17
    path: /bin/bash
Binaries:
  Node:
    version: 20.10.0
    path: /opt/node-v20.10.0-linux-x64/bin/node
  Yarn:
    version: 1.22.18
    path: /usr/local/bin/yarn
  npm:
    version: 10.2.3
    path: /opt/node-v20.10.0-linux-x64/bin/npm
  Watchman: Not Found
SDKs:
  Android SDK:
    API Levels:
      - "23"
      - "28"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
      - "34"
    Build Tools:
      - 28.0.3
      - 29.0.2
      - 29.0.3
      - 30.0.0
      - 30.0.1
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 33.0.0
      - 33.0.1
      - 34.0.0
      - 35.0.0
    System Images:
      - android-16 | Intel x86 Atom
      - android-21 | Google APIs Intel x86 Atom
      - android-24 | Google Play Intel x86 Atom
      - android-28 | Google APIs Intel x86 Atom
      - android-28 | Google APIs Intel x86 Atom_64
      - android-30 | Android TV Intel x86 Atom
      - android-30 | China version of Wear OS 3 Intel x86 Atom
      - android-30 | Wear OS 3 ARM 64 v8a
      - android-30 | Wear OS 3 Intel x86 Atom
      - android-30 | ARM 64 v8a
      - android-30 | Intel x86_64 Atom
      - android-30 | Google TV Intel x86 Atom
      - android-30 | Google APIs ARM 64 v8a
      - android-30 | Google APIs Intel x86 Atom
      - android-30 | Google APIs Intel x86_64 Atom
      - android-30 | Google Play ARM 64 v8a
      - android-30 | Google Play Intel x86 Atom
      - android-30 | Google Play Intel x86 Atom_64
      - android-32 | Google Play Intel x86_64 Atom
      - android-33 | Google APIs Intel x86_64 Atom
      - android-33 | Google Play Intel x86_64 Atom
      - android-34 | Google Play Intel x86_64 Atom
    Android NDK: Not Found
IDEs:
  Android Studio: Not Found
Languages:
  Java:
    version: 17.0.10
    path: /usr/lib/jvm/jdk-17-oracle-x64/bin/javac
  Ruby:
    version: 2.7.0
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.6
    wanted: 0.73.6
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
Stacktrace or Logs
No Stacktrace
Reproducer

https://github.com/YuriLima23/IssuePlaceholder

Screenshots and Videos

image

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách chạy reproducer IssuePlaceholder được liên kết với React Native 0.73.6 trên Android 14, sau đó kiểm tra entry point Android của TextInput để xem fontFamily của placeholder được áp dụng như thế nào. So sánh placeholder với nội dung TextInput khác sử dụng font Roboto đã cấu hình; hoàn thành nghĩa là placeholder tôn trọng fontFamily trên Android 14 và hành vi này được bao phủ bởi một regression test.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
android, react-native
Lĩnh vực
mobile
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.