diff --git a/src/react-middle-truncate/middle-truncate.jsx b/src/react-middle-truncate/middle-truncate.jsx index e7b5e5c..381c8e1 100644 --- a/src/react-middle-truncate/middle-truncate.jsx +++ b/src/react-middle-truncate/middle-truncate.jsx @@ -117,7 +117,7 @@ class MiddleTruncate extends PureComponent { return; } - const selectedText = window.getSelection().toString(); + const selectedText = window.getSelection().toString().trim(); // If smartCopy is set to partial or if smartCopy is set to all and the entire string was selected // copy the original full text to the user's clipboard