Closed
Bug 159354
Opened 23 years ago
Closed 23 years ago
Linebreaks are not preserved when copying text from Chimera
Categories
(Camino Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: cblackst, Assigned: bryner)
References
Details
Attachments
(2 files, 2 obsolete files)
192 bytes,
text/html
|
Details | |
3.43 KB,
patch
|
sfraser_bugs
:
superreview+
|
Details | Diff | Splinter Review |
1) I select a bunch of text in Chimera, about 20 lines of text, each line
separated with a carriage return
2) I paste it into Word
All other browsers paste the text into Word with the correct line formatting
(line breaks at correct places)
Chimera 0.4, however, runs all the text together, displaying the carriage
returns as a Square, which I'm assuming is some sort of ASCII character
Reporter | ||
Comment 2•23 years ago
|
||
It does not happen with Mozilla 1.1b
Comment 4•23 years ago
|
||
i'm guessing we're missing some XP_MACOSX in the dom code or the like.
Assignee: pinkerton → bryner
Comment 5•23 years ago
|
||
related to bug 157635 - Pasting Text clipping incorrect form contents?
Comment 7•23 years ago
|
||
I can occasionally reproduce this on a version of Mozilla I've built on Solaris,
and I suspect a mach-o build on MacOSX. I havn't got a test case, but this may
be a Mozilla bug.
Comment 8•23 years ago
|
||
One place where Mozilla doesn't insert line breaks when cutting and pasting is
table rows. I'm not sure if this is the same problem as this bug, which would
then be a Mozilla bug, or if this is a different bug.
Ideally cutting and pasting the table should result in:
line 1, cell 1line 1, cell 2
line 2, cell 1line 2, cell 2
but actually results in:
line 1, cell 1line 1, cell 2 line 2, cell 1line 2, cell 2
Of course I dont' ahve Chimera around to test this on...
Assignee | ||
Comment 9•23 years ago
|
||
Ok, so one thing that makes this tricky is that files on OS X seem to generally
use unix linebreaks, but it appears that we need text on the clipboard to use
mac linebreaks to keep compatibility with non-Cocoa apps. This patch changes
the line breaking any time we serialize html or plaintext, which fixes this
problem... but I think a more correct fix might be to do this in the clipboard
code. I'm not sure where exactly to do that at. Pink, Simon, what do you
think?
Comment 10•23 years ago
|
||
Maybe akk can tell us all the places we need to fix the linebreaks.
We are in a hybrid Mac/Unix world here. I would think that files that we save
should have Unix linebreaks, but how does Word deal with those? It does make
sense for the clipboard to have Mac linebreaks, as long as Cocoa apps are happen
receiving such pastes too.
Updated•23 years ago
|
Summary: Carriage lines are not preserved when copying text from Chimera → Linebreaks are not preserved when copying text from Chimera
Comment 11•23 years ago
|
||
Most places should generally use NS_LINEBREAK, so if NS_LINEBREAK is \n for OS
X, then you change the clipboard code to use \r instead, that might be all you
need.
That's set in nsCRT.h; I would think it would be better to change it there
rather than just for the html and plaintext serializers (why not the xml
serializer? What about later ones that might get added?) Are other places
where OS X wants \r instead, so that would be a better default?
A few places, like some mail code, use windows linebreaks (\r\n) rather than
NS_LINEBREAK, so those will be broken for OS X just as they already are for mac
and unix.
Assignee | ||
Comment 12•23 years ago
|
||
It appears that Cocoa apps (and I'm using TextEdit as my basis for this) can
receive either unix or mac linebreaks ok from the clipboard, but Word only likes
mac linebreaks.
akkana, I'm not sure I follow what you're saying. At first you say we should
change it just for the clipboard, then you say we should change NS_LINEBREAK in
nsCRT.h. If we change NS_LINEBREAK in nsCRT.h we'll impact writing of files, so
I'd prefer not to do that. Where would be the appropriate place to fix the line
endings just for the clipboard?
Assignee | ||
Comment 13•23 years ago
|
||
This one converts linebreaks from unix to mac in nsClipboard, just before the
text is placed on the clilpboard.
Attachment #93985 -
Attachment is obsolete: true
Comment 14•23 years ago
|
||
What about drag and drop?
Assignee | ||
Comment 15•23 years ago
|
||
This fixes dragging text, too.
Attachment #94089 -
Attachment is obsolete: true
Updated•23 years ago
|
Attachment #94126 -
Flags: review+
Comment 16•23 years ago
|
||
Comment on attachment 94126 [details] [diff] [review]
patch v2.1
use the same comment in both places (don't make someone open up another file to
read about a 3 line comment) and r=pink
Comment 17•23 years ago
|
||
Comment on attachment 94126 [details] [diff] [review]
patch v2.1
sr=sfraser
Attachment #94126 -
Flags: superreview+
Comment 18•23 years ago
|
||
*** Bug 161815 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 19•23 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 20•23 years ago
|
||
*** Bug 156285 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•