mohebifar / mohebifar/react-native-copilot
Copilot doesn't work with modal on iOS
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
Current Behavior
Copilot doesn't work with modal on iOS, but working on android.
Input Code
class CopilotModal extends React.PureComponent<Props, State> {
static defaultProps = {
onStart: () => {},
onEnd: () => {},
};
state = {
visible: true,
};
componentDidMount() {
this.props.start();
}
componentWillUnmount() {
this.props.copilotEvents.off('stop');
}
onClose = () => {
this.setState({ visible: false });
};
render() {
const { visible } = this.state;
const { children } = this.props;
return (
<Modal visible={visible} transparent onRequestClose={() => {}}>
<CopilotStep
text="Some text"
order={1}
name="recommended"
>
<CopilotView style={{ width: width / 2, height: 55 }} />
</CopilotStep>
</Modal>
);
}
}
const wrapped = copilot({
overlay: 'svg', // or 'view'
animated: true, // or false
androidStatusBarVisible: false,
tooltipComponent: props => <CopilotTooltip {...props} />,
stepNumberComponent: () => <View />,
})(CopilotModal);
Expected behavior/code
Should show copilot in modal
Environment
- Device: iPhone 4s, IPhone X
- OS: iOS 9, 10, 12
react-native-copilot: 2.4.1react-native: 0.57.7react-native-svg: 8.0.8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided CopilotModal reproduction using react-native-copilot 2.4.1 on iOS, comparing the modal behavior with Android. Trace the modal and overlay integration, then verify that the copilot appears inside the modal on the listed iOS versions without regressing Android behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100