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

Hotfix line endings

Open andmetoo opened this issue 9 years ago • 15 comments

🔨The ends of lines don't work correctly in the created layer, textarea element is necessary for correct work.

andmetoo avatar May 23 '16 19:05 andmetoo

Can you provide jsfiddle/jsbin with example of what exactly didn't work for you? Not sure what's your exact problem is, but release https://github.com/sudodoki/copy-to-clipboard/releases/tag/1.1.1 did work with newlines correctly (although there was an issue with content that needed escaping - see some closed issues for more info).

sudodoki avatar May 23 '16 21:05 sudodoki

Yea you can check jsfiddle Just past copied data to any spreadsheets, like google spreadsheets. test in master branch

andmetoo avatar May 23 '16 21:05 andmetoo

Will try to get to this on weekend, need to figure out if there are other workarounds and test usual test cases.

sudodoki avatar May 24 '16 08:05 sudodoki

Thanks for bringing this up.

sudodoki avatar May 24 '16 08:05 sudodoki

There are no problems, can help at any time with any questions

andmetoo avatar May 24 '16 12:05 andmetoo

@sudodoki if this PR passes the tests, we can merge it, make couple fixes and release new patch (3.0.5). With textarea we will drop couple variables and make code a little better.

shvaikalesh avatar Jul 10 '16 10:07 shvaikalesh

@shvaikalesh need to verify we are not going to run into issues with multiline text and final newline in chrome/safari vs firefox in textarea as during writing e2e test it turned out there are inconsistencies (might be only with pasting, and not setting value through js). Don't think I will have time to do that now, although this change might be desirable.

sudodoki avatar Jul 10 '16 10:07 sudodoki

hello old fix really has a big problem if the copy 40000 rows. I found a solution which is suitable for all scenarios, this method work in all cases for themselves now. I'm sorry for error.

andmetoo avatar Jul 10 '16 13:07 andmetoo

innerHTML is not cool. Please, see closed issues for details.

shvaikalesh avatar Jul 10 '16 14:07 shvaikalesh

yea this is sucks, can we use method depending on the situation?

andmetoo avatar Jul 10 '16 14:07 andmetoo

Is there any progress on this? This problem is biting me in the ass too. I'm willing to help out, if needed.

SEAPUNK avatar Sep 02 '16 19:09 SEAPUNK

Bump; any updates?

SEAPUNK avatar Oct 18 '16 15:10 SEAPUNK

@andmetoo @SEAPUNK still didn't have enough time to look into this re https://github.com/sudodoki/copy-to-clipboard/pull/26#issuecomment-231581375. Might consider depending on andmetoo/copy-to-clipboard#hotfix-line-endings from package.json for time being

sudodoki avatar Oct 23 '16 12:10 sudodoki

@SEAPUNK U can use directly from my fork npm install --save https://github.com/andmetoo/copy-to-clipboard/tarball/hotfix-line-endings

andmetoo avatar Oct 23 '16 12:10 andmetoo

I am, but I prefer that I install from releases.

SEAPUNK avatar Oct 23 '16 14:10 SEAPUNK