react / react/react-native

[iOS] Adding outline to `TextInput` causes it to lose focus

Đang mở
#53,440 7 bình luận 1 reaction 0 người được giao Xem trên GitHub

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

Component: TextInput Needs: React Native Team Attention Platform: iOS Type: New Architecture
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

On iOS, if TextInput with overflow: hidden is rendered with an outline while focused, it immediately loses focus. This also means that if outline is used to indicate focus state (like on web), the TextInput becomes impossible to interact with.

Steps to reproduce
  1. Run the snack
  2. Switch on "Enable outline"
  3. Press on the text input
  4. Notice how the keyboard closes immediately, and the text input loses focus
React Native Version

0.80.1

Affected Platforms

Runtime - iOS

Output of npx @react-native-community/cli info
N/A — reproduces via Expo Snack/Expo Go
Stacktrace or Logs
N/A
MANDATORY Reproducer

https://snack.expo.dev/@simplecreations/ios---adding-outline-to-textinput-causes-it-to-lose-focus

Screenshots and Videos

https://github.com/user-attachments/assets/de1bdfc6-c0f1-4b71-af15-fce5e45b58c0

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 với reproducer Expo Snack bắt buộc và xác nhận hành vi trên iOS với React Native 0.80.1. Truy vết cách TextInput đang được focus được render khi overflow bị ẩn và outline được bật. Hoàn thành khi bàn phím vẫn mở và TextInput giữ focus trong cấu hình đó.

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

Đánh giá

Công nghệ
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
42/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.