TextInput broken with writingDirection
Đang mở
Chưa có ai nhận issue này.
Component: TextInput
Issue: Author Provided Repro
Needs: React Native Team Attention
- 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
TextInput UI was broken with writingDirection, both ltr and rtl. It will display correctly if we focus the input
import { TextInput, View } from 'react-native'
export default function HomeScreen() {
return (
<View style={{ flex: 1, paddingTop: 50, backgroundColor: '#FFF' }}>
<View style={{ flexDirection: 'row', gap: 8 }}>
<TextInput
value={
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Velit morbi nisi aptent condimentum nisi fringilla rutrum sociis senectus ac. Torquent mauris risus ultricies aenean vitae erat mollis congue dui mus'
}
placeholder='Enter your text here'
numberOfLines={1}
multiline={false}
style={{
borderWidth: 1,
borderColor: 'black',
borderRadius: 5,
alignSelf: 'stretch',
writingDirection: 'rtl',
paddingHorizontal: 2,
height: 40
}}
/>
</View>
</View>
)
}
Steps to reproduce
Use the code snippet above
React Native Version
0.81.5
Affected Platforms
Runtime - iOS
Output of npx @react-native-community/cli info
% npx @react-native-community/cli info
error: unknown command 'info'
(Did you mean init?)
Stacktrace or Logs
none
MANDATORY Reproducer
https://github.com/maphongba008/input-writing-direction-issue
Screenshots and Videos
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- 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 bắt buộc tại https://github.com/maphongba008/input-writing-direction-issue với React Native 0.81.5 trên iOS, sử dụng ví dụ TextInput được cung cấp và kiểm thử cả hai giá trị ltr và rtl của writingDirection. Được xem là hoàn thành khi văn bản được hiển thị chính xác trước khi input nhận focus, mà không phụ thuộc vào việc focus input.
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
- 38/100