Open
Bug 302597
Opened 20 years ago
Updated 4 years ago
Unable to paste HTML-formatted text after copying part of a table contained in <span>
Categories
(Core :: DOM: Editor, defect, P5)
Core
DOM: Editor
Tracking
()
NEW
mozilla1.9alpha1
People
(Reporter: stephend, Unassigned)
Details
Attachments
(3 files)
Build ID: 2005-07-28-06, Windows XP SeaMonkey trunk.
Steps to Reproduce:
1. http://www.fixedorbit.com/AS/10/AS10565.htm
2. Select from the A in ASN Name down to the O in Verio
3. Attempt to paste into the HTML compose window in mail.
Expected Results:
Able to paste
Actual Results:
Silent failure to paste (no JS console messages logged)
Raw HTML source:
<b>ASN</b></td><td width="80%"><b>Name</b></td></tr><tr><td>2914</td><td><a
href="/AS/2/AS2914.htm">VERIO</a>
Plain-text output
ASN Name
2914 VERIO
Reporter | ||
Updated•20 years ago
|
Flags: blocking1.8b4?
Comment 1•20 years ago
|
||
Can anyone confirm that this occurs in FF or TBird? Until then minusing for beta.
Flags: blocking1.8b4? → blocking1.8b4-
Reporter | ||
Comment 2•20 years ago
|
||
(In reply to comment #1)
> Can anyone confirm that this occurs in FF or TBird? Until then minusing for
beta.
Yes, I can confirm that. Tried with today's Firefox trunk and yesterday's
Thunderbird trunk; can't paste.
Reporter | ||
Updated•20 years ago
|
Flags: blocking1.8b4- → blocking1.8b4?
Comment 3•20 years ago
|
||
When did this regress and can we get a reduced testcase? It appears that
selecting and copying only part of the table causes the failure but the full
table works.
Reporter | ||
Comment 4•20 years ago
|
||
ASN Name
2
That's the reduced testcase. If I select just ASN Name, it works, and pastes
a table with a row. Sorry, no idea when this regressed.
Comment 5•20 years ago
|
||
Blake - can you take a look and figure out where to redirect? Unless we can get
someone to own this looks like it is not going to make it for 1.5b
Assignee: mozeditor → mrbkap
Severity: critical → minor
Flags: blocking1.8b4? → blocking1.8b4-
Reporter | ||
Comment 6•20 years ago
|
||
Better steps:
1. Load http://www.fixedorbit.com/AS/10/AS10565.htm
2. Select from the "e" in Name _to_ the "2" in 2914.
That gives you the following HTML:
e</b></td></tr><tr><td>2
Comment 7•20 years ago
|
||
This also doesn't work for me with Mozilla1.7
Reporter | ||
Comment 8•20 years ago
|
||
Select from B down to 2, then try to paste into Thunderbird or SeaMonkey.
Reporter | ||
Comment 9•19 years ago
|
||
Mats--think you might be able to take a look?
Comment 10•19 years ago
|
||
The key here is the inline element (<span> in this testcase, <font> in the
original) which wraps the table. Without it everything is OK.
Comment 11•19 years ago
|
||
What's being copied into the clipboard in this case is:
<span><tr><td>B</td></tr><tr><td>2</td></tr></span>
Notice that while the enclosing <span> is included, the <table> is not. This
probably later confuses the paste operation.
The reason that the <span> is included, but the <table> is not (although they
are both common ancestors of the selection start and end points) is that
nsDocumentEncoder::IncludeInContext(), called by
nsDocumentEncoder::SerializeRangeContextStart() for each of the common
ancestors, returns TRUE for <span>, <font>, etc., but FALSE for <table>.
(see
http://lxr.mozilla.org/mozilla/source/content/base/src/nsDocumentEncoder.cpp#1252 )
So that's (I think) the problem. I'll leave it to someone with better
understanding than mine to come up with a solution.
Comment 12•19 years ago
|
||
This is kind of hackish:
Exclude from the "context" anything which is outside the (innermost) <table>
element in the common ancestors list.
If anybody thinks this makes sense let me know and I'll find out who I should
ask for a review. I'm off to sleep now.
![]() |
||
Updated•19 years ago
|
Flags: blocking1.9a1?
Comment 13•19 years ago
|
||
more descriptive summary, to help searching.
Summary: Unable to paste HTML-formatted text → Unable to paste HTML-formatted text after copying part of a table contained in <span>
Reporter | ||
Updated•19 years ago
|
Attachment #199863 -
Flags: review?(jst)
Reporter | ||
Updated•19 years ago
|
Attachment #199863 -
Flags: review?(jst) → review?(roc)
I don't really have a clue what's going on here. How about Blake?
Updated•19 years ago
|
Attachment #199863 -
Flags: review?(roc) → review?(mrbkap)
Comment 15•19 years ago
|
||
Comment on attachment 199863 [details] [diff] [review]
one option
I'd really rather not do this if possible. It seems that the hacks to paste tables would be lining up one after the other (see also bug 228920). I'll look into this and see if I can see what's going on to fix it in a cleaner way. So I'll minus this for now, but if I can't figure out a cleaner way, I'll plus it.
Attachment #199863 -
Flags: review?(mrbkap) → review-
Updated•19 years ago
|
OS: Windows XP → All
Priority: -- → P3
Hardware: PC → All
Target Milestone: --- → mozilla1.9alpha
Reporter | ||
Updated•19 years ago
|
Severity: minor → normal
Flags: blocking1.9a1? → blocking1.9-
Whiteboard: [wanted-1.9]
Updated•18 years ago
|
QA Contact: editor
Updated•17 years ago
|
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Flags: wanted1.9-
Flags: wanted1.9+
Flags: wanted-next+
Comment 16•16 years ago
|
||
Is this the same as bug 428096?
Comment 17•16 years ago
|
||
No, bug 428096 is OSX-only.
Updated•16 years ago
|
Assignee: mrbkap → nobody
Comment 18•4 years ago
|
||
Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority.
If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.
Severity: normal → S4
Priority: P3 → P5
You need to log in
before you can comment on or make changes to this bug.
Description
•