Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touchable area of context menu is too small on Android #119

Open
Stafox opened this issue May 19, 2024 · 2 comments
Open

Touchable area of context menu is too small on Android #119

Stafox opened this issue May 19, 2024 · 2 comments

Comments

@Stafox
Copy link

Stafox commented May 19, 2024

RN 0.74.1

Content of context menu is highlighted with orange.
image

On Android it tappable only on the top border (1-3px) of orange area. On iOS everything is fine. Any idea how to make all children content of ContextMenu tappable?

return (
    <View style={classes.root}>
      <BottomSheet bottomSheetModalRef={bottomSheetModalRef} />
      <ContextMenu
        style={{ backgroundColor: 'orange' }}
        width={24}
        height={24}
        onLongPress={() => null}
        dropdownMenuMode={true}
        actions={[
          { title: i18n.t('translate_to'), icon: icons.language },
          { title: i18n.t('report_content_issue'), icon: icons.report, destructive: true },
        ]}
        onPress={(e) => {
          console.warn('ContextMenu tapped');
        }}
      >
        <View style={classes.touchable}>
          <MenuCircleIcon />
        </View>
      </ContextMenu>
    </View>
  );

@Stafox
Copy link
Author

Stafox commented May 20, 2024

Seems like it related to the RN issue like this entria/react-native-view-overflow#32

same issue was discussed there: facebook/react-native#26374

I was able to find a workaround by expanding parent area and use positioning to put it to the required place.

@Stafox
Copy link
Author

Stafox commented Jun 18, 2024

Still get another issue. On Android it renders outside of visible area.
image

@mpiannucci have you experienced such behaviour before? Any idea for workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant