Closed
Bug 69024
Opened 24 years ago
Closed 24 years ago
Copy text from a textarea drops starting spaces
Categories
(Core :: DOM: Selection, defect, P3)
Tracking
()
mozilla1.0
People
(Reporter: BenB, Assigned: anthonyd)
References
Details
(Whiteboard: [plaintext][serializer][copy][correctness])
Attachments
(1 file)
29.60 KB,
image/jpeg
|
Details |
From bug 68166:
Spaces at the beginning of a line are collapsed, e.g.
z
z
is pasted as
z
z
Comment 1•24 years ago
|
||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.9.1
Comment 2•24 years ago
|
||
this is truly spacey.
Comment 4•24 years ago
|
||
i need to know what you pasted TO. It makes a difference.
![]() |
||
Comment 5•24 years ago
|
||
I see the problem pasting from textareas into xterm or emacs.
Furthermore, highlighting in a textarea and hitting ctrl-c then looking in the X
clipboard, the leading spaces are missing there too.
Reporter | ||
Comment 6•24 years ago
|
||
jfrancis, in this case, it doesn't matter - in all cases, the spaces are lost. I
tried as targets: Same textfield (copy from bugzilla comment field to same
bugzilla comment field), xemacs, gnome terminal. Same result everywhere.
Comment 7•24 years ago
|
||
here's the deal: the return gets converted to a <br> at paste time. Spaces after
a <br> do not render in html. So I need to convert the first space after the <
br> to be an nbsp. My whitespace work in progress will fix this.
Comment 8•24 years ago
|
||
my comment above applies to pasting into moz editor widget (any flavor). Not
sure yet why pasting into outside tezt-only app would be a problem. That is
probably a seperate plaintext-serializer issue.
Reporter | ||
Comment 9•24 years ago
|
||
jfrancis, IMO, copy&paste from a (plaintext) textfield (which this comment field
is) to anything else should copy in plaintext flavor, not HTML. This would lead
to many more-or-less subtle bugs.
Comment 10•24 years ago
|
||
it already does. nonetheless, even plaintext editor widgets have to convert
newlines into <br> nodes. The reason for this has to do with implementation of
layout; it's not something that we just wanted to do for giggles. :-)
Comment 11•24 years ago
|
||
This is happening even when copying from a mozilla textarea and pasting into an
external plaintext app (as Ben noted). So the plaintext we're generating is
wrong (the leading spaces are already gone), unrelated to anything we do when
pasting it back into our own editor.
This is a regression -- we used to have this problem some six months ago, but it
was fixed. Does anyone know how long ago this regressed? That might help in
pinning it down.
Joe, did you say your whitespace changes fix this? If so, we can just wait for
your landing and not worry about tracking this down further.
Comment 12•24 years ago
|
||
*** Bug 72811 has been marked as a duplicate of this bug. ***
Comment 13•24 years ago
|
||
Akkana, my ws work does not fix this. It would, if the space made it that far.
But they never do. They are lost at copy time, not at paste time. Can you find
an owner for this? It's almost certainly the plaintext serializer.
You can bounce back to me if you don't care about it getting fixed soon.
Assignee: jfrancis → akkana
Status: ASSIGNED → NEW
Assignee | ||
Comment 15•24 years ago
|
||
moving to 0.9.2
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Updated•24 years ago
|
Whiteboard: [plaintext]
Target Milestone: mozilla0.9.2 → mozilla1.0
Reporter | ||
Comment 16•24 years ago
|
||
admin: nominate for mozilla0.9.3 (no such keyword yet)
Comment 17•24 years ago
|
||
I think the title of this bug should be changed because textareas are not the
only place where you can copy text and appears this bug. It also happens when
copying the text from a message composing window.
![]() |
||
Comment 18•24 years ago
|
||
*** Bug 80835 has been marked as a duplicate of this bug. ***
![]() |
||
Comment 19•24 years ago
|
||
*** Bug 86208 has been marked as a duplicate of this bug. ***
Comment 20•24 years ago
|
||
*** Bug 86373 has been marked as a duplicate of this bug. ***
Comment 21•24 years ago
|
||
hmm, sounds like serializer is confused about what flavor to use.
Whiteboard: [plaintext] → [plaintext][serializer][copy][correctness]
Comment 22•24 years ago
|
||
I believe this is a dup of 86450 which I have a fix for.
*** This bug has been marked as a duplicate of 86450 ***
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•