-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow copying only a selection of text #2753
Conversation
@@ -90,9 +91,10 @@ class ReportActionItem extends Component { | |||
* | |||
* @param {Object} [event] - A press event. | |||
*/ | |||
showPopover(event) { | |||
showPopover(event, selection) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a @param
JSDoc for selection
please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
@@ -54,7 +54,7 @@ class ReportActionContextMenu extends React.Component { | |||
onPress: () => { | |||
const message = _.last(lodashGet(this.props.reportAction, 'message', null)); | |||
const html = lodashGet(message, 'html', ''); | |||
const text = lodashGet(message, 'text', ''); | |||
const text = props.selection || lodashGet(message, 'text', ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
selection
needs to be defined in the propTypes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
…sify.cash into viacheslav-selectText
Updated |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging in version: 1.0.42-1🚀
|
🚀 Deployed to production in version: 1.0.44-0🚀
|
Details
we get selection when the event of contextmenu is triggered. window.getSelection().toString();
Fixed Issues
Fixes #2665
Tests
QA Steps
Same as above
Tested On
Screenshots
Web
https://drive.google.com/uc?export=view&id=1WFtc-t6NuaLDZ1xM016ggYxfCUhxjJUb
Mobile Web
Desktop
https://drive.google.com/uc?export=view&id=1EJUC7rZFNFFCraIcqLDCIJzBGObdMfeN
iOS
Android