I would only suggest one change in the article, and advice to anyone using this... always have a separate action item on screen for this. A copy button, next to the text, or if a textarea an overlay or above or below.
Having the copy action on a click trigger will be unexpected behavior. Click on the text should probably do a `.select()` of the entire field though, but not copy to clipboard. A separate action should be doing that.