react-middle-truncate
react-middle-truncate copied to clipboard
Support triple-click selections for smartCopy
A triple-click selection typically results in a newline character being added to the end of the selection string, which was incompatible with how we were comparing the copied string to our known text (===). By trimming the whitespace from the selection we can ensure a correct match.
Pull Request Checklist
- Added/updated the following to reflect my change:
- [I can add one if you think it's needed] Unit tests
- [N/A?] Documentation
- Tested against the different major versions of React
- [N/A? Not a react-related issue] v15.5.x
- [N/A?] v16.x.x
- [x] Unit tests have passed.
- [x] Code linting has passed.