copy-to-clipboard icon indicating copy to clipboard operation
copy-to-clipboard copied to clipboard

Multiline text on mobile pasted as single line

Open andrepcg opened this issue 7 years ago • 7 comments

Multiline text gets pasted as single line on mobile.

Tested with both Chrome on Android and Safari on iOS

andrepcg avatar Sep 18 '17 08:09 andrepcg

Hi, thanks for report

  1. any specific versions you were testing at?
  2. is there a page at which I could try to reproduce this issue?

sudodoki avatar Sep 18 '17 09:09 sudodoki

I'm using React-copy-to-clipboard and in package.json it's referencing version "^3".

Try this on mobile and desktop: https://z2q88r7qo3.codesandbox.io/

andrepcg avatar Sep 18 '17 09:09 andrepcg

Tried that on iOS 10.3.1 on built in (I assume that's built in used in other apps, not 100%) / chrome browser – works for me. Let me see if I can get hands on device that could help me reproduce this.

sudodoki avatar Sep 18 '17 09:09 sudodoki

Try pasting it in excel. It shows as single line. Excel parses newline to indicate multiple rows. I am in same boat.

ericlau-solid avatar Dec 08 '17 18:12 ericlau-solid

Same problem here. Tried on several phones, all iOS phones are good, but Android phones are screwed. On my Android phone, seems all \n characters are replaced to spaces.

smilefufu avatar Jun 26 '19 06:06 smilefufu

I have the same problem. Is there any solution? On Android phones, “ \ n" is not work

whalestore avatar Jul 20 '19 16:07 whalestore

My solution is use another copy module: https://www.npmjs.com/package/react-clipboard.js

smilefufu avatar Jul 21 '19 02:07 smilefufu