Adium

Ticket #6893 (closed defect: fixed)

Opened 1 year ago

Last modified 4 months ago

carriage return not copied when executing cut and paste between message windows in AIM and Yahoo IM

Reported by: datalinebrett Assigned to:
Priority: normal Milestone: Adium X 1.2.1
Component: Message View Version: 1.2b3
Severity: normal Keywords: carriage return
Cc: Patch: Initially Included
Pending: 0

Description

I am using Mac OS x 10.4.9 the carriage return is not copied nor pasted when attempting to cut and paste between message windows in AIM. to replicate the experience:

  1. type a message in a contact window. include a carriage return in the message between lines
  2. cut the entire message from that message window
  3. open a new message window of another contact
  4. paste the message in the message window
  5. the result is a copy of the original message but without a carriage return

this seems to be a bug in more recent versions as I used to perform this action in previous versions without this same result.

Attachments

Picture 1.png (54.7 kB) - added by fahrvergnuugen on 05/22/2007 09:49:25 AM.
First I copied and pasted from this bug posting. Then I copied and pasted from the message window and sent it again. As you can see, the line breaks have vanished!
messagestylesPatch.diff (15.2 kB) - added by jas8522 on 12/29/2007 01:18:50 PM.
Fixes for message styles with extra line breaks
messagestylesPatch.2.diff (15.2 kB) - added by jas8522 on 12/29/2007 02:59:03 PM.
Fixed closing tag
Picture 1.2.png (39.7 kB) - added by alien88 on 12/29/2007 09:53:21 PM.
So jas can see what I mean
messageStylesPatch.diff (16.2 kB) - added by jas8522 on 12/30/2007 12:13:47 AM.
Smooth Op Padding on the right side for better presentation of message text

Change History

05/11/2007 09:48:48 AM changed by jas8522

  • component changed from None to Adium UI.
  • milestone set to Needs feedback from users.

I cannot reproduce this - using 1.0.3 and 1.1svn with gtalk and MSN contacts. Can anyone else confirm this occurence via YIM and AIM?

05/22/2007 09:47:47 AM changed by fahrvergnuugen

Yes, I can confirm this bug. It does exactly what's described. I was just about to submit this bug and I found that someone else had already submitted it.

If I copy & paste text from a webpage or email, the carriage returns are kept. If I then copy & paste the same text from the message window to send to another buddy, it it gets pasted without the line breaks.

05/22/2007 09:49:25 AM changed by fahrvergnuugen

  • attachment Picture 1.png added.

First I copied and pasted from this bug posting. Then I copied and pasted from the message window and sent it again. As you can see, the line breaks have vanished!

06/25/2007 09:33:47 PM changed by jas8522

  • pending changed.
  • milestone changed from Needs feedback from users to Needs Feedback - Received.

12/23/2007 02:53:07 PM changed by jas8522

  • owner deleted.
  • version changed from 1.0.3 to 1.2b3.
  • component changed from Adium UI to Message View.
  • milestone changed from Needs Feedback - Received to Known problems which need steps to reproduce.

Take a look at #8631 - I still cannot reproduce it but it seems others certainly can. We need EXACT steps to reproduce that work every single time on every computer with an install of Adium you can find.

Does the message with missing linebreaks appear in the text entry area after pasting it in, but before sending the message?

12/23/2007 07:02:35 PM changed by alien88

jas,

those are the exact steps I use to reproduce it. I had Newtylicious on irc test it out too and he was able to reproduce it.

To answer your question, the message with missing linebreaks APPEARS fine until you press enter to return the message, then it has no line breaks. Also, if you look at the lines from the adium debug log it's converting the <BR> into <U+2028>.

I'm running 10.5.1

12/23/2007 07:39:43 PM changed by jas8522

  • cc set to edr1084.

Oddly enough I don't get those conversion lines in the debug log, and I've tried this with both MSN and AIM... :S

Eric, any chance you can reproduce this?

12/23/2007 08:34:20 PM changed by edr1084

The issue is actually an issue with certain message styles. I attempted to reproduce using my default (candybars) and was unable to do so. Then I switched to stockholm as is shown in the screenshot and it does indeed exhibit this problem. As such, this isn't a bug in the Adium internals so I think this can be closed on our end.

12/23/2007 08:40:13 PM changed by jas8522

  • cc deleted.
  • milestone changed from Known problems which need steps to reproduce to Good idea for "later".

However Stockholm is a built in style, so I think we're obligated to try and fix it... I wonder if the messages styles themselves specify encoding - that would explain why some don't recognize UTF.

12/23/2007 10:02:28 PM changed by alien88

It also occurs in Mockie - so it's not just the Stockholm style. It is definitely related to the style, however. I can reproduce it in Mockie, Smooth Operator, and Stockholm but not Gone Dark or minimal_mod.

12/28/2007 08:04:32 PM changed by alien88

All of the default themes that have this issue have the %message% between two paragraph tags. For instance:

Mockie

Content.html:        <div class="time_initial">%time%</div><p>%message%</p>

Versus one that doesn't have it:

GoneDark

Content.html:				<div class="contentText">%message%</div>

Removing the paragraph tags from Mockie results in this bug from not occurring for me.

I'm not sure if this is being caused by 10.5 or what.. but that's what is going on.

12/29/2007 11:10:12 AM changed by jas8522

So I went through and removed the paragraph tags from those styles that had them and now all styles DON'T work for me.... it was fine when the paragraph tags were there, but now that I've removed them the linebreaks are gone after a copy and paste and submission of the 'duplicate' message!

Even Gone Dark, which I didn't touch (since the paragraph tags were already missing from it) shows no linebreaks in messages with clear linebreaks the first time around. I'd have to assume it was like this for me all along with Gone Dark.

You say you experience the opposite of this behaviour?

Additional issue that I've seen reported here before but cannot find a ticket for: re-opening the message window results in 4 linebreaks (exactly double) between words. The transcripts viewer only shows 2 linebreaks (the correct number) between words which I confirmed in the raw XML file, so it appears to be a problem in the recent history cache.

12/29/2007 01:18:07 PM changed by jas8522

  • milestone changed from Good idea for "later" to Adium X 1.2.

OK I'm not sure why that happened that one time I loaded it, but it's all good now. I'm attaching a diff that contains the fixes for all the messages styles where the paragraph tags have been removed. I had to make some other changes to them as well to get it to work properly with div tags.

I also adjusted some of the spacing in Smooth Operator - I think it looks better now. Someone should definitely try this on Tiger (just in case) before it goes into a release. Setting to 1.2, but feel free to push it.

My previous comment about the extra linebreaks in the recent history cache - does that seem likely?

12/29/2007 01:18:50 PM changed by jas8522

  • attachment messagestylesPatch.diff added.

Fixes for message styles with extra line breaks

12/29/2007 01:52:49 PM changed by jas8522

Well now I'm really confused... it was working fine after I edited them, so I built Adium with the changes and now it's not working again - without the paragraph tags I am now getting no breaks when copy and pasting.

12/29/2007 02:23:31 PM changed by edr1084

  • milestone changed from Adium X 1.2 to Adium X 1.2.1.

jas: For one thing you closed your div in Outgoing/Context.html with </text> instead of </div>. Also, you might try using %message%<br> instead of just removing the paragraph tags (completely untested but it was a thought I had while looking at your patch). Also, rather than recompiling, save yourself the trouble and then just rename the xtra. That way it can be used independently of the included version while you're testing it with no need for compiling (not needed anyway since if simply copies the files into the resources at compile time.) If you don't figure it out I'll try to take some time to look over this tonight.

I'm also not going to consider this a blocker for 1.2 so I'm pushing it to 1.2.1. If it gets fixed before 1.2 goes final then we'll certainly move it back.

12/29/2007 02:57:52 PM changed by jas8522

Yep good call. I guess that div tag wasn't doing much then because they were all displaying fine even with </text> in there.

My concern with throwing in <br> tags is that sometimes it works and sometimes it doesn't without them there at all. If that's the case, then we might end up with an extra break when there shouldn't be one.

New patch has the fixed </div> tag rather than </text>. Though now I don't even think it matters that these changes are applied since it seems the paragraph tag wasn't the problem...

12/29/2007 02:59:03 PM changed by jas8522

  • attachment messagestylesPatch.2.diff added.

Fixed closing tag

12/29/2007 09:53:21 PM changed by alien88

  • attachment Picture 1.2.png added.

So jas can see what I mean

12/29/2007 09:56:22 PM changed by alien88

This does fix the copy/pasting of newlines issue, however it results in the history from OLD messages being weird. See the screen shot.

12/30/2007 12:05:32 AM changed by alien88

That fixes it for me!

12/30/2007 12:13:47 AM changed by jas8522

  • attachment messageStylesPatch.diff added.

Smooth Op Padding on the right side for better presentation of message text

12/30/2007 01:40:31 AM changed by evands

So which of these should be applied? Just the most recent?

(The 'replace existing file of the same name' checkbox is useful in situations like this).

12/30/2007 01:49:25 AM changed by jas8522

Haha yeah I started using that for the last few. Yes the most recent one has all the previous ones included plus the additional little fixes for padding and margins.

01/10/2008 01:17:30 PM changed by evands

  • patch_status changed from None to Initially Included.

So will this close the ticket when applied?

01/10/2008 03:13:11 PM changed by alien88

As far as I'm concerned, Yes.

01/10/2008 04:56:19 PM changed by evands

  • status changed from new to closed.
  • resolution set to fixed.

(In [22241]) Fixed carriage returns for copy-paste purposes from Mockie, Stockholm, and Smooth Operator message styles; patch from Jordan Schelew. Fixes #6893

01/10/2008 04:57:04 PM changed by evands

(In [22242]) Merged [22241]: Fixed carriage returns for copy-paste purposes from Mockie, Stockholm, and Smooth Operator message styles; patch from Jordan Schelew. Fixes #6893

01/14/2008 06:01:48 PM changed by evands

  • milestone changed from Adium X 1.2.1 to Adium X 1.2.2.

01/15/2008 09:54:52 PM changed by evands

  • milestone changed from Adium X 1.2.2 to Adium X 1.2.1.