Children inherit parent's properties when parent has boxShadow + scale + overflow:hidden
Chưa có ai nhận issue này.
- 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 a parent View has all three of these properties:
boxShadowtransform: [{ scale }]← Required to trigger the bugoverflow: 'hidden'
Children incorrectly inherit the parent's borderRadius and scale transform(and others properties if set), even though these properties should not be inherited.
Additional Context
Removing any one of these properties makes the bug disappear
- Removing
overflow: 'hidden'makes the bug disappear - Removing
boxShadowmakes the bug disappear - Removing
transform: scalemakes the bug disappear
Everything works great on Android
Steps to reproduce
- Create a parent
Viewwith these exact properties:
overflow: 'hidden'
boxShadow: ...
transform: [{ scale: ... }] - Create a child
Viewinside the parent with:
borderRadius: 0 (should be square) - Run the app on iOS/tvOS
React Native Version
0.81.4
Affected Platforms
Build - MacOS
Output of npx @react-native-community/cli info
System:
OS: macOS 26.1
CPU: (11) arm64 Apple M3 Pro
Memory: 161.42 MB / 36.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.18.0
path: ~/.nvm/versions/node/v22.18.0/bin/node
Yarn: Not Found
npm:
version: 10.9.3
path: ~/.nvm/versions/node/v22.18.0/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 25.1
- iOS 26.1
- macOS 26.1
- tvOS 26.1
- visionOS 26.1
- watchOS 26.1
Android SDK:
API Levels:
- "34"
- "35"
- "36"
Build Tools:
- 34.0.0
- 35.0.0
- 36.0.0
System Images:
- android-30 | Android TV Intel x86 Atom
- android-34 | Android TV ARM 64 v8a
- android-34 | Android TV Intel x86 Atom
- android-34 | Google APIs ARM 64 v8a
- android-35 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.1 AI-241.19072.14.2412.12360217
Xcode:
version: 26.1.1/17B100
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.13
path: /opt/homebrew/opt/openjdk@17/bin/javac
Ruby:
version: 3.4.1
path: /opt/homebrew/opt/ruby/bin/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: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
no crash
MANDATORY Reproducer
https://snack.expo.dev/@annaryb/graceful-indigo-pizza
Screenshots and Videos
| IOS bug | ANDROID no bug |
|---|---|
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 Snack bắt buộc trên iOS hoặc tvOS, sau đó so sánh đầu ra của nó với Android trong khi thay đổi boxShadow, scale và overflow:hidden. Issue không nêu tên tệp mã nguồn hoặc bài kiểm thử nào. Được xem là hoàn tất khi View con không còn kế thừa borderRadius hoặc scale của phần tử cha với tổ hợp được báo cáo, mà không gây hồi quy trên các nền tảng khác.
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-dev
- 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
- 35/100