Adium

Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#6893 closed defect (fixed)

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

Reported by: datalinebrett Owned by:
Milestone: Adium 1.2.1 Component: Message View
Version: Severity: normal
Keywords: carriage return Cc:
Patch Status: Accepted

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 (5)

Picture 1.png (54.7 KB) - added by Paul Wieland 13 years ago.
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 Jordan 12 years ago.
Fixes for message styles with extra line breaks
messagestylesPatch.2.diff (15.2 KB) - added by Jordan 12 years ago.
Fixed closing tag
Picture 1.2.png (39.7 KB) - added by Mike Garrison 12 years ago.
So jas can see what I mean
messageStylesPatch.diff (16.2 KB) - added by Jordan 12 years ago.
Smooth Op Padding on the right side for better presentation of message text

Download all attachments as: .zip

Change History (31)

comment:1 Changed 13 years ago by Jordan

Component: NoneAdium UI
Milestone: 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?

comment:2 Changed 13 years ago by Paul Wieland

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.

Changed 13 years ago by Paul Wieland

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!

comment:3 Changed 13 years ago by Jordan

Milestone: Needs feedback from usersNeeds Feedback - Received
pending: 0

comment:4 Changed 12 years ago by Jordan

Component: Adium UIMessage View
Milestone: Needs Feedback - ReceivedKnown problems which need steps to reproduce
Owner: nobody deleted
Version: 1.0.31.2b3

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?

comment:5 Changed 12 years ago by Mike Garrison

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

comment:6 Changed 12 years ago by Jordan

Cc: Eric Richie added

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?

comment:7 Changed 12 years ago by Eric Richie

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.

comment:8 Changed 12 years ago by Jordan

Cc: Eric Richie removed
Milestone: Known problems which need steps to reproduceGood 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.

comment:9 Changed 12 years ago by Mike Garrison

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.

comment:10 Changed 12 years ago by Mike Garrison

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.

comment:11 Changed 12 years ago by Jordan

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.

comment:12 Changed 12 years ago by Jordan

Milestone: Good idea for "later"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?

Changed 12 years ago by Jordan

Attachment: messagestylesPatch.diff added

Fixes for message styles with extra line breaks

comment:13 Changed 12 years ago by Jordan

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.

comment:14 Changed 12 years ago by Eric Richie

Milestone: Adium X 1.2Adium 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.

comment:15 Changed 12 years ago by Jordan

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

Changed 12 years ago by Jordan

Attachment: messagestylesPatch.2.diff added

Fixed closing tag

Changed 12 years ago by Mike Garrison

Attachment: Picture 1.2.png added

So jas can see what I mean

comment:16 Changed 12 years ago by Mike Garrison

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

comment:17 Changed 12 years ago by Mike Garrison

That fixes it for me!

Changed 12 years ago by Jordan

Attachment: messageStylesPatch.diff added

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

comment:18 Changed 12 years ago by Evan Schoenberg

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

comment:19 Changed 12 years ago by Jordan

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.

comment:20 Changed 12 years ago by Evan Schoenberg

Patch Status: NoneInitially Included

So will this close the ticket when applied?

comment:21 Changed 12 years ago by Mike Garrison

As far as I'm concerned, Yes.

comment:22 Changed 12 years ago by Evan Schoenberg

Resolution: fixed
Status: newclosed

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

comment:23 Changed 12 years ago by Evan Schoenberg

(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

comment:24 Changed 12 years ago by Evan Schoenberg

Milestone: Adium X 1.2.1Adium X 1.2.2

comment:25 Changed 12 years ago by Evan Schoenberg

Milestone: Adium X 1.2.2Adium X 1.2.1

comment:26 Changed 11 years ago by Robert

Patch Status: Initially IncludedAccepted
Note: See TracTickets for help on using tickets.