Skip to content

Pressing on Segment Tab is not working when the Segmented Control is wrapped under TapGestureHandler #886

@fbele

Description

@fbele

The tapping on control segmented button (tab) stops working when wrapped with TapGestureHandler, for example:

      <GestureHandlerRootView style={$gestureHandlerRootView}>
        <TapGestureHandler onBegan={resetInactivityTimer}>
          <View style={$gestureHandlerWrapper}>
            <SegmentedControl
                values={['Tab 1', 'Tab 2']}
                selectedIndex={selectedSegmentIndex}
                onChange={(event) => {
                  handleSegmentChange(event.nativeEvent.selectedSegmentIndex)
                }}
              />
          </View>
        </TapGestureHandler>
      </GestureHandlerRootView>

If you slide it it will still work, but that is not a nice UX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions