Closed
Bug 57477
Opened 24 years ago
Closed 24 years ago
Moving text from one <LI> to another <LI> does the wrong thing
Categories
(Core :: DOM: Editor, defect, P3)
Core
DOM: Editor
Tracking
()
VERIFIED
FIXED
mozilla0.9.2
People
(Reporter: kmcclusk, Assigned: mozeditor)
References
Details
(Whiteboard: [list][QAHP] fix in hand, will check in soon)
Attachments
(3 files)
342 bytes,
text/html
|
Details | |
22.15 KB,
patch
|
Details | Diff | Splinter Review | |
21.51 KB,
patch
|
Details | Diff | Splinter Review |
To reproduce:
1. load the attachment in composer
2. select the <Move under heading1> text
3. ctrl-c to copy to clipboard
4. Click on the <LI> under heading1
5. ctrl-v to paste
Expected:
The selected text should be pasted next to the heading 1 list item.
<this is what happens in 4.x>
What happens:
The selected text is placed in a new nested <LI> underneath the first heading.
If you load the attachment into composer
This is a bug that I run into every week when preparing my status report.
The test case was built using N6-composer.
Reporter | ||
Comment 1•24 years ago
|
||
Reporter | ||
Comment 2•24 years ago
|
||
This bug makes it difficult to produce my weekly status report. I normally copy
and paste items from emails into my status template which contains pre-existing
<LI>'s.
Reporter | ||
Comment 3•24 years ago
|
||
The following is the result of saving the file after doing the paste.
heading1<br>
<ul>
<li>
<ul>
<li>Move under heading1</li>
</ul>
<br>
</li>
</ul>
<br>
heading2<br>
<ul>
<li>Move under heading1</li>
</ul>
A <ul> and <li> have been placed around the outside of the text that was pasted.
I tried various ways of selecting the text. Triple clicking/ dragging from
right, dragging from the left, they all yield the same results.
I am using branch build 2000102008.
Comment 4•24 years ago
|
||
trible click will select the text and surrounding element structure, dbl-click
selects just the text, but just in case something else is going on here, asking
joe to take a look
Assignee: beppe → jfrancis
Target Milestone: --- → mozilla0.9
Assignee | ||
Comment 5•24 years ago
|
||
This is actually working as designed (beleive it or not!). When you copy, we
have no way to know if you mean to copy the text, the li, or the ul. Our
strategy is to copy the outmost element for which all the children are selected.
This may seem wrong here but if you had a three item list and selected across all
three items it would suddenly seem very right.
Even though I think the copy behavior is correct, that doesn't mean we shouldn't
change the paste behavior. Probably most users would prefer that lists get
merged into other lists on paste, rather than sublisted. I'm going to give that
I try and see what folks think.
cc'ing a random assortment of others to get comments.
Status: NEW → ASSIGNED
Comment 7•24 years ago
|
||
In case anyone needs a workaround for now: note Joe's comment about *all* the
children being selected. If you omit one character at the beginning or end of
the selected text, then it won't include the parent. You'll have to type that
one character again, of course.
Adding Lisa because she asked me a similar question (or filed a bug, I forget
which) recently and may want to track this if the behavior changes.
Yes, I was confused when this happened to me. The workaround was fine for me.
I just could not figure out how to copy text only from a table cell without
having the entire table cell being pasted!
Assignee | ||
Comment 9•24 years ago
|
||
hmmm. no one ever gave me comments on my proposal. adding charlie, since he is
always good for a good comment!
Comment 10•24 years ago
|
||
I'll comment: the current behavior seems better than the opposite, of not
copying the enclosing structure (we got more complaints when we did that, and
that's why we made it work this way).
However, we could be even smarter, e.g. paste could notice that it contains only
list items, and is being pasted into an empty list item (is that pretty much
what's happening here?) and merge the pasted list items into the existing list.
That might be a step toward doing what most users expect (and if the user
really did want a sublist, it would be easy to create one then paste into that
empty list item, or highlight the desired sublist items and click indent).
Being that smart sounds like it might be a lot of work, though, and probably not
a high priority.
Comment 11•24 years ago
|
||
While I agree with Joe that we should copy parent block elements, such as LI and
OL, when the all of list item is selected. There are cases, such as pasting
into an existing list, where pasting should insert a new list item (merged into
the destination list, thus the OL in the copy source is ignored.)
In cases where you paste into a non-list block, it seems to me that you
shouldn't paste the LI and OL.
Assignee | ||
Comment 12•24 years ago
|
||
moving a bunch of 0.9 bugs to 0.9.1
Target Milestone: mozilla0.9 → mozilla0.9.1
Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Assignee | ||
Comment 13•24 years ago
|
||
this behavior is intentional. Beth will add a dependency on another bug
momentarily, for giving the user choice at copy time.
Comment 14•24 years ago
|
||
From a usability standpoint, I see two things that would make this less of an
issue for users:
* pasting being smarter (notice that an li is being inserting into an li and
insert them relative to the current levels, not increasing levels)
* making the increase/decrease of margins work correctly for lists as well as
blockquotes (this would allow users to easily remove extra list levels).
This second issue isn't really the same as this bug and should be covered in an
existing bug or filed as a new bug.
Updated•24 years ago
|
Whiteboard: [QAHP] → [list][QAHP]
Assignee | ||
Comment 15•24 years ago
|
||
Assignee | ||
Comment 16•24 years ago
|
||
attached a patch that fixes this (additional pasting smarts for lists).
Whiteboard: [list][QAHP] → [list][QAHP] fix in hand
Updated•24 years ago
|
Whiteboard: [list][QAHP] fix in hand → [list][QAHP] fix in hand, need r=, sr=
Comment 17•24 years ago
|
||
r=brade
note: this also seems to fix bug #66579 so I'm adding the dependency
Blocks: 66579
Assignee | ||
Comment 18•24 years ago
|
||
Comment 19•24 years ago
|
||
I have tested the latest patch (6/13/01); it works very well. r=brade
Whiteboard: [list][QAHP] fix in hand, need r=, sr= → [list][QAHP] fix in hand, need sr=, a=
Assignee | ||
Comment 20•24 years ago
|
||
kin just sr'd this for me, modulo sme changes he requested which I will make.
Whiteboard: [list][QAHP] fix in hand, need sr=, a= → [list][QAHP] fix in hand, need a=
Comment 21•24 years ago
|
||
a= asa@mozilla.org for checkin to the trunk.
(on behalf of drivers)
Blocks: 83989
Updated•24 years ago
|
Whiteboard: [list][QAHP] fix in hand, need a= → [list][QAHP] fix in hand, will check in soon
Assignee | ||
Comment 22•24 years ago
|
||
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 23•24 years ago
|
||
this is fixed, however, after performing step 5) we add an extra
bullet. I don't like this behavior.
Beth has sent Joe a note on this, I might file a bug.
but I will mark this bug verified-fixed because it is a different issue
which is fixed.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•