dominicstop / react-native-ios-context-menu

A react-native component to use context menu's (UIMenu) on iOS 13/14+
MIT License
572 stars 29 forks source link

AuxiliaryPreview appears underneath ContextMenu on larger messages and is therefore blocked from being interacted with #111

Open TowhidKashem opened 2 weeks ago

TowhidKashem commented 2 weeks ago

Hi, first thank you for the amazing lib! It works wonderfully except one issue:

On larger messages the auxiliary view is covered by the context menu:

Screenshot 2024-11-03 at 1 44 02 AM

On smaller messages it looks fine:

Screenshot 2024-11-03 at 1 44 28 AM

Code:

<ChatBlock>
  <Wrapper>
    <ContextMenuView
      menuConfig={{
        menuTitle: '',
        menuItems: getContextMenuOptions(type)
      }}
      previewConfig={{ borderRadius: BUBBLE_RADIUS }}
      auxiliaryPreviewConfig={{
        anchorPosition: 'bottom',
        alignmentHorizontal: 'stretchScreen',
        transitionEntranceDelay: 'RECOMMENDED'
      }}
      renderAuxiliaryPreview={() => (
        <ReactionBar
          message={message}
          handleReactMessage={handleReactMessage}
        />
      )}
      onPressMenuItem={({ nativeEvent }) => {
        handleMessageLongPress(nativeEvent.actionKey, message);
      }}
      isContextMenuEnabled={!disableMenu}
    >
      <Bubble>
        {children}
      </Bubble>
    </ContextMenuView>
  </Wrapper>
</ChatBlock>

Is there any way to fix this or work around it? Ideally the context menu will appear anywhere else on the bubble that doesn't directly cover the auxiliary view.

ruairioliverwv commented 6 days ago

I had the same problem, I went with using a custom preview component.

Screenshot 2024-11-13 at 11 21 00