Closed
Bug 57147
Opened 24 years ago
Closed 24 years ago
Can't select text on line without selecting line break
Categories
(Core :: DOM: Selection, defect, P3)
Tracking
()
RESOLVED
WONTFIX
mozilla0.9
People
(Reporter: hsivonen, Assigned: mozeditor)
Details
Attachments
(1 file)
183 bytes,
text/html
|
Details |
Build ID 2000101521 Solaris Sparc trunk
When selecting all visible characters on a line before a paragraph break, the
line break is selected, too.
Steps to reproduce:
1) Open the attached test case
2) Open XTerm with shell
3) Select the text in the test case
4) Middle button paste into shell
Actual results:
There is no visual indication of the line break being selected. Upon paste the
command is executed!
Expected results:
Expected to be able to select text with or without the line break and expected
to see visual indication (selection extending about 1em past the last visible
character) when the line break is included in the selection.
Reporter | ||
Comment 1•24 years ago
|
||
Assignee | ||
Comment 4•24 years ago
|
||
There is no line break. You are selecting an entire html paragraph. The
serializer is adding a newline at the end when converting to plaintext. This is
so that if you select, for instance, TWO paragraphs and paste into (whatever text
app), you get your para's converted to two seperate lines of plaintext.
This is working as designed. I agree it's annoying in the case you describe.
Perhaps the serializer should only emit a newline when there is indeed more
copied content after the block element. This would also fix bug 55661.
Akkana, what do you think?
Status: NEW → ASSIGNED
Comment 5•24 years ago
|
||
Maybe we could be smarter about not including the paragraph break in the
selection if it was the last thing selected? Really, the user only wants it if
there's something after the paragraph break.
Assignee | ||
Comment 6•24 years ago
|
||
I'm not sure what you mean here. There is a paragraph. All of it's children are
selected. If we don't cause that to also grab the paragraph, users will have no
way to tell if they are copying a paragraph or not.
The ironic thing is we also have a bug somewhere (I think) about wanting
paragraphs to cause *two* trailing newlines to be emitted when serializing to
plaintext. This is so you get the empty line between para's when serializing.
I think my earlier suggestion is probably bad. With it, you get different
results from the erializer if you serialize an element at a time versus
serializing the entire doc at once.
What we have now may be the best we can do here.
Comment 7•24 years ago
|
||
I was reading the original bug report to mean that not all of the paragraph's
children had been selected, just the end of the paragraph. E.g. the user had
clicked somewhere inside a paragraph and dragged to the end of it. That's
something I do a lot -- start at some arbitrary place and drag past the end or
beginning of a nearby line. In this case, I don't think we want to include the
paragraph tag, since not all its children are selected. If the whole paragraph
is selected, then you're probably right, what we're doing is probably the best
we can do.
Comment 8•24 years ago
|
||
Hello.
I'm using build 2000122805 on WinNT, and I get this bug regardless of whether or
not I've selected to the end of a paragraph, IE, copied text from inside the
Mozilla windo usually has a newline inserted at the end of it when pasted
elsewhere, even in this text box.
Look, I'm going to copy and paste some text off this page in between two pipes:
|ll visible char
|
I swear I didn't press enter, just Ctrl-v (windows paste shortcut) But, when I
get text from a bold area just above this comment box:
|tional Com|
Wierd.
Comment 9•24 years ago
|
||
zacjacobson is probably seeing bug 56135 -- it sounds like he's copying from a
plaintext area although he doesn't make it clear exactly where he's copying
from.
Comment 10•24 years ago
|
||
Akkana: I think what I'm seeing is more closely related to this bug than to bug
56135 . Perhaps I should submit it as a new bug? Maybe I misunderstand 56135?
Please advise.
To clarify: I have Mozilla NT build 2000122805 pointing at
http://bugzilla.mozilla.org/show_bug.cgi?id=57147 and I am selecting text from
the main window, the Comments area of the page, and then I paste into the
Additional Comments Text area.
In addition to what I've described above, if I select a substring from the text
in the URI text area in the Mozilla interface, and hit the Windows copy shortcut
(Ctrl-c), a newline is ALWAYS appended to the text in the clipboard.
Cheers. Zac.
Comment 11•24 years ago
|
||
If it's anywhere inside a pre tag or pre style (which also applies to all text
fields and text areas) then it's bug 56135. I suspect the comments area is all
preformatted since it's reproducing comments which were typed in in plaintext.
Assignee | ||
Comment 12•24 years ago
|
||
indeed, the text getting copied is preformatted. the original bug is only
fixable if we add a user gesture to differenciate between selecting containers
and selecting all their children. The later conversion is about a different
problem that we have other open bugs on. So I'm marking this wontfix.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•