+ Reply to Thread
Results 1 to 8 of 8

Thread: Line breaks disappear on copy & paste

  1. #1
    sunside is offline Registered User
    Join Date
    Mar 2008
    Posts
    14
    Downloads
    0
    Uploads
    0

    Default Line breaks disappear on copy & paste

    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.

  2. #2
    sunside is offline Registered User
    Join Date
    Mar 2008
    Posts
    14
    Downloads
    0
    Uploads
    0

    Default Problem persists

    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.

  3. #3
    rosali's Avatar
    rosali is offline Super Moderator
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    2,392
    Downloads
    36
    Uploads
    0

    Default

    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.

  4. #4
    sunside is offline Registered User
    Join Date
    Mar 2008
    Posts
    14
    Downloads
    0
    Uploads
    0

    Exclamation Text Editor

    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).

  5. #5
    rosali's Avatar
    rosali is offline Super Moderator
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    2,392
    Downloads
    36
    Uploads
    0

    Default

    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 "<br />" by "\r\n<br />" in preview pane.

    -Roland

  6. #6
    sunside is offline Registered User
    Join Date
    Mar 2008
    Posts
    14
    Downloads
    0
    Uploads
    0

    Exclamation

    I have now looked at the HTML source. The message text is put inside a
    <div class="pre"> </div>

    and has no <br /> 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):

    <div style="white-space: pre;">Test
    Text</div>

    But it is copied if I use
    <pre style="white-space: -moz-pre-wrap;">Test
    Text</pre>

    which seems otherwise functionally equivalent to the above. But where in the code can I replace the <div... with a <pre... ?

  7. #7
    sunside is offline Registered User
    Join Date
    Mar 2008
    Posts
    14
    Downloads
    0
    Uploads
    0

    Lightbulb

    I propose using <pre> tags generally with the following CSS:

    Wrapping Text Inside Pre Tags at T. Longren

  8. #8
    sunside is offline Registered User
    Join Date
    Mar 2008
    Posts
    14
    Downloads
    0
    Uploads
    0

    Default

    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?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts