Author Topic: Line breaks disappear on copy & paste  (Read 5913 times)

Offline sunside

  • Jr. Member
  • **
  • Posts: 14
Line breaks disappear on copy & paste
« on: March 06, 2008, 11:28:20 AM »
Hi there,

for some e-mails, we use pre-formulated text that comes with an e-mail containing a request from a web form.

This text is copied from the e-mail, then the user clicks on "reply" and pastes the text at the top of the reply. When doing this, the line breaks always disappear in the pasted text! :-\

This does not happen with other e-mails, e.g. sent from a mail client to us.

I already tried replacing the line breaks with explicit \r\n's in the text (sent from a PHP script), but that doesn't change anything.

It would be very important to get a solution on this issue for us.

Thank you, any help is appreciated.

P.S.: I have tried it with RC2 and v0.1, it happens with both versions.

Offline sunside

  • Jr. Member
  • **
  • Posts: 14
Problem persists
« Reply #1 on: September 29, 2008, 11:09:42 AM »
Hi,

with Roundcube 0.2, this problem is still the same. Am I the only one?

Copying from the preview of a plain text e-mail, then clicking "reply", and pasting the text will remove all line breaks.

Thank you for your help.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Line breaks disappear on copy & paste
« Reply #2 on: September 30, 2008, 01:59:13 AM »
Cannot really reproduce it. If you paste into the text editor field, line breaks do not disappear. Yes, if you paste into the html editor they disappear (which seems to be a TinyMCE issue).

So, I would recommend to disable the HTML editor by default.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline sunside

  • Jr. Member
  • **
  • Posts: 14
Text Editor
« Reply #3 on: September 30, 2008, 02:28:59 AM »
I am only using the text editor all the time - I am not into HTML e-mails. So that cannot be the problem.

I have now done some more testing. The problem seems to be browser specific. It DOES occur with Firefox 3 on Windows and Mac, and it did NOT occur with Safari on a Mac (same server setup, same e-mail).

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Line breaks disappear on copy & paste
« Reply #4 on: September 30, 2008, 04:16:44 AM »
OK, no I see. I does not happen with IE7, too.

Please release a ticket on RoundCube Webmail ? Trac. Issue should be solved by the devs. I think they have to replace "
" by "\r\n
" in preview pane.

-Roland
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline sunside

  • Jr. Member
  • **
  • Posts: 14
Line breaks disappear on copy & paste
« Reply #5 on: October 02, 2008, 05:59:31 AM »
I have now looked at the HTML source. The message text is put inside a


and has no
 breaks.

So I made a test page and found out that the line breaks are not copied by Firefox in the first place for this (which Roundcube uses):

Test
Text


But it is copied if I use
Test
Text


which seems otherwise functionally equivalent to the above. But where in the code can I replace the

Offline sunside

  • Jr. Member
  • **
  • Posts: 14
Line breaks disappear on copy & paste
« Reply #6 on: October 02, 2008, 06:12:29 AM »
I propose using
 tags generally with the following CSS:

Wrapping Text Inside Pre Tags at T. Longren

Offline sunside

  • Jr. Member
  • **
  • Posts: 14
Line breaks disappear on copy & paste
« Reply #7 on: October 03, 2008, 09:58:39 AM »
I would like to add that also, when replying to an e-mail, the line breaks seem to get screwed up. Most replies contain NO line breaks in the quoted text anymore once they come back. To clarify this:

Sender A sends e-mail with "Text A" -> line breaks displayed OK
I reply in Roundcube (under Firefox) -> line breaks OK for quoted text A AND my reply B
Sender A replies to that -> line breaks OK for my reply B and his text C, but the quoted text A has NO more line breaks...

Please - could you look into this?