react / react/react-native

[iOS] Shadow styles are unexpectedly applied to elements in the subtree

未关闭
#33,969 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Bug Impact: Bug Never gets stale Platform: iOS
主要语言
C++
星标
127k
派生
25.3k
平均合并
1 天 23 小时
30 天内合并 PR
4

描述

Description

Setting the iOS-only shadow* style props on a View can unexpectedly apply shadows to multiple elements in the view's subtree. This issue can be reproduced in Fabric too.

Version

0.68

Output of npx react-native info

...

Steps to reproduce
  1. Open: https://snack.expo.dev/MmY5VRLKN
  2. Select iOS preview
  3. Notice how the shadow applied to a wrapping view causes text elements to receive a shadow, and the background to be tinted the color of the shadow
Snack, code example, screenshot, or link to a repository

https://snack.expo.dev/MmY5VRLKN

image

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

先在 iOS 预览中打开链接的 Snack 复现,并比较其在 Fabric 中的行为。跟踪包裹它的 View 上仅限 iOS 的 shadow props 如何影响其子树;完成的标准是后代文本不再接收阴影,并且背景不会被阴影颜色染色。

由索引模型根据 Issue 内容生成。

评估

技术栈
ios, react-native
领域
mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。