Pressable does not trigger when child View uses pseudo classes (active:/hover:)
維護者通常 3 天內回覆
@danstepanov 已經在處理了。
開始於 2025年10月15日。
評估
這個 Issue 還沒有評估資料。
描述
Describe the bug
When a Pressable contains a child View styled with NativeWind pseudo classes like active: or hover:, clicking/tapping that child does not trigger the Pressable’s onPress. However, pressing on sibling elements without pseudo classes correctly triggers the Pressable.
Reproduction
A simple reproduction looks like this:
<Pressable onPress={() => console.log('Pressed!')}>
<View className="bg-gray-200">
<Text>Works</Text>
</View>
<View className="active:bg-blue-500">
<Text>Does not trigger</Text>
</View>
</Pressable>
A full repoduction repo is here: https://stackblitz.com/edit/nativewind-test-n18mtyun?file=nativewind.test.tsx
Expected behavior
the onPress should fire regardless of which child of the pressable is pressed.
- 主要語言
- TypeScript
- 星號
- 166
- 分支
- 45
- 平均合併
- 13 天 14 小時
- 30 天內合併 PR
- 1
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
nativewind/react-native-css 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
nativewind/react-native-css#545 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
nativewind/react-native-css#544 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
nativewind/react-native-css#543 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 84/100
nativewind/react-native-css#540 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
nativewind/react-native-css#538 ·
維護者通常 3 天內回覆
查看 nativewind/react-native-css 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
area:web p3
難度 2/5 1-3 小時 新手友好度 72/100
Lets-Parley/Parley#912 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
wealthfolio/wealthfolio#2376 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
be-BOP-io-SA/be-BOP#2817 ·
維護者通常 5 天內回覆
-
documentation good first issue
難度 1/5 1-3 小時 新手友好度 84/100
sno-ai/sno-station#149 · 1 則留言 ·
維護者通常 1 天內回覆