Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Pressable does not trigger when child View uses pseudo classes (active:/hover:)

Đang mở
#262 3 bình luận 2 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

@danstepanov đang làm issue này rồi.

Từ ngày 15/10/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

deferred (post-5.0)

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.

Ngôn ngữ chính
TypeScript
Star
166
Fork
45
Merge trung bình
13 ngày 14 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

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.

Issue khác của nativewind/react-native-css

Tất cả issue của nativewind/react-native-css

Issue tương tự

Thêm issue về TypeScript

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.