Closed Bug 22944 Opened 25 years ago Closed 25 years ago

inserting an <A> in a table splits the table

Categories

(Core :: DOM: Editor, defect, P3)

x86
Other
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: buster, Assigned: mozeditor)

Details

start with an empty document in the editor app. insert a 1x2 table (1 row, 2 cells) notice the caret is in the second cell by default click "Insert Link" type in some text to insert ("text in the link"), and a URL for the <A> tag click "OK" Result: a document containing 2 tables each with 1 cell, with the new content "text in the link" between them. Expected Result: a document containing 1 table with 2 cells, with the new content "text in the link" in the second cell.
Status: NEW → ASSIGNED
yah. There are two issues here. The first is that we should detect attempts to generate illegal html and not allow it. The second is that I need to improve insertion code so that the scenario you describe results in a legal action rather than an illegal one.
It's probably obvious, but I guess all the "insert element" actions need to test for table cell parentage and be sure not to split any higher than that level, correct? If there's anything I should do to help in the nsHTMLEditor::InsertElementAtSelection code, just ask.
Target Milestone: M13
m13
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
fixed. had to ifdef out some of charlie's code - need to chat with him about what he wants to do with it.
Status: RESOLVED → VERIFIED
verified in 1/13 build.
You need to log in before you can comment on or make changes to this bug.