Skip to content

[Android] Title and message areas are tappable and trigger callback unexpectedly #343

@daichi000

Description

@daichi000

Description

On Android, the title and message areas of the ActionSheet are tappable and trigger the callback function unexpectedly. This behavior differs from iOS where only the option buttons should be tappable.

Environment

Platform: Android
React Native: 0.76.9
@expo/react-native-action-sheet: ~4.1.0
Emulator: Pixel 9a (API 36.0)

Code example

const handlePress = () => {
  showActionSheetWithOptions({
    options: ['Option 1', 'Option 2', 'Cancel'],
    cancelButtonIndex: 2,
    title: 'This title is tappable on Android',
    message: 'This message is also tappable on Android',
  }, (selectedIndex) => {
    console.log('Callback triggered with index:', selectedIndex);
    // This gets called even when title/message is tapped
  });
};

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