expo / expo/react-native-action-sheet

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

Open
#343 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.6k
Forks
223
PR merge metrics
No merged PRs in 30d

Description

### 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
});
};
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.