react-middle-truncate icon indicating copy to clipboard operation
react-middle-truncate copied to clipboard

Support triple-click selections for smartCopy

Open benwiley4000 opened this issue 5 years ago • 0 comments

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.

benwiley4000 avatar Mar 05 '20 00:03 benwiley4000