mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-02 22:41:18 +08:00
Summary: This PR solves issue #13618. Selectable text still behaves the same way: ```jsx <Text selectable={true}>yo yo yo</Text> ```  Text that is not selectable and has a custom tooltip now do not include the copy item: ```jsx import * as React from 'react'; import { Text } from 'react-native'; import ToolTip from 'react-native-tooltip'; const MyComponent = () => ( <Text> <Text>This is my text.</Text> <ToolTip actions={[ {text: 'My', onPress: (): any => null }, {text: 'Context', onPress: (): any => null }, {text: 'Menu', onPress: (): any => null }, ]} underlayColor='transparent' longPress={true} arrowDirection='down' > <Text>You can long press me for a tooltip.</Text> </ToolTip> <Text>This is the rest of my text</Text> </Text> ); export default MyComponent; ```  Closes https://github.com/facebook/react-native/pull/13619 Reviewed By: shergin Differential Revision: D4936900 Pulled By: ericvicenti fbshipit-source-id: 82028b0958c37d63b8a80882196295be4aebecb4