Skip to content

Not working when inside a TouchableWithoutFeedback #136

@BrodaNoel

Description

@BrodaNoel

On this code, the onPress event of TouchableWithoutFeedback won't work

<TouchableWithoutFeedback
        onPress={() => {
          if (!answeredCountry) {
            Alert.alert('🤓', i18n.t('Try to guess the country before seeing the details'));
            return;
          }

          setIsShowingSpot(true);
        }}
      >
        <View
          style={{
            borderRadius: 16,
            overflow: 'hidden',
          }}
        >
          <ReactNativeZoomableView
            maxZoom={30}
            minZoom={1}
            zoomStep={0.5}
            initialZoom={1}
            bindToBorders={true}
            onZoomAfter={() => {}}
            contentWidth={componentWidth}
            contentHeight={componentWidth / (spot.main.a || 1)}
          >
            <View
              style={{
                width: componentWidth,
                height: componentWidth / (spot.main.a || 1),
              }}
            >
              <SmartImage
                isDark={isDark}
                spotId={spot.i}
                uri={spot.main.u}
                onError={onImageError}
              />
            </View>
          </ReactNativeZoomableView>
        </View>
      </TouchableWithoutFeedback>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions