Closed
Bug 141019
Opened 23 years ago
Closed 22 years ago
{ib} text appears out of order after pasting or insertion via JS
Categories
(Core :: DOM: Editor, defect, P3)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
mozilla1.5alpha
People
(Reporter: sujay, Assigned: kinmoz)
References
()
Details
(Keywords: polish, topembed+, Whiteboard: [EDITORBASE+)
Attachments
(3 files, 2 obsolete files)
|
133 bytes,
text/html
|
Details | |
|
265 bytes,
text/html
|
Details | |
|
4.30 KB,
patch
|
roc
:
review+
roc
:
superreview+
asa
:
approval1.4+
|
Details | Diff | Splinter Review |
using 4/29 trunk build
1) launch netscape
2) launch composer
3) type in some text and new line
4) in browse(separate window), jump to above URL
5) select and copy the bullet: "How to get daily builds"
in the 3rd column
6) click in the newline in the composer window
7) paste
8) try typing some text after the bullet
results: the text will be on line before the bullet
expected: text to be on line after bullet
marking nsbeta1 and EDITORBASE per Kevin's email.
Keywords: nsbeta1
Summary: text is written out on line before bullet after pasting → text is written out on line before bullet after pasting bullet
Whiteboard: EDITORBASE
Taking away the plus, and adding 4xp, and here is why:
The page we are copying from is external content, and we are still trying to fix
problems in content that we generate. Supporting 4.x imported stuff (either by
opening 4.x docs, or copy paste), has to follow the other issues on the list.
In this case, the structure of the list entry is completely different than we
would do in mozilla composer. In mozilla composer, the font specification is
always inside the LI (list item). In 4.x, it is outside. And our engine is not
designed to deal with this easily.
In the future, we probably want to have some UI that helps us know what we are
importing (via open, or perhaps "paste as Word", "paste as 4.x", etc.. We need
to know what it is we are dealing with an apply an appropriate transformation to
the incoming data to make it compatible with our way of doing things. Not a
suprising thing; many editors have the same issue. We just are not there yet.
Comment 5•23 years ago
|
||
content is correct. This is a layout bug involving font blocks (yuck)
Comment 7•23 years ago
|
||
We need sample list that is not in a behind-NS-firewall document.
Removing minus for Buffy consideration, but I'm inclined to not worry about it
now.
Updated•23 years ago
|
Component: Editor: Composer → Editor: Core
Comment 8•23 years ago
|
||
Kin can not reproduce with current trunk build.
updating with new URL..
also I can reproduce with 8/16 build
REOPEN.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
| Assignee | ||
Comment 10•23 years ago
|
||
There instructions above should say "click on one of the blank lines *below* the
list item". I took step 8 above to mean type something in the list item after
the bullet.
| Assignee | ||
Comment 11•23 years ago
|
||
| Assignee | ||
Comment 12•23 years ago
|
||
| Assignee | ||
Comment 13•23 years ago
|
||
I just attached 2 test cases to this bug. My guess is that we're inserting the
new frame for the text node between the special block-in-inline frames we create
for the <font> tag.
We'll probably have to add some code that takes into account the
NS_FRAME_IS_SPECIAL bit, and keeps getting the next sibling until it finds the
last special frame and insert after it.
Status: REOPENED → ASSIGNED
Priority: -- → P3
Summary: text is written out on line before bullet after pasting bullet → {ib} text is written out on line before bullet after pasting bullet
Target Milestone: mozilla1.2alpha → mozilla1.2beta
| Assignee | ||
Comment 14•23 years ago
|
||
I'm attaching this work in progress patch so I don't lose it while I'm working
on other bugs. This actually fixes the reported test case. But I suspect I'll
have to make the same changes to ContentAppended().
See also bug 168883, maybe?
Comment 16•23 years ago
|
||
resummarizing since this isn't list-specific
Keywords: polish
Summary: {ib} text is written out on line before bullet after pasting bullet → {ib} text appears out of order after pasting or insertion via JS
Comment 17•23 years ago
|
||
*** Bug 128918 has been marked as a duplicate of this bug. ***
Updated•23 years ago
|
QA Contact: sujay → beppe
Comment 18•22 years ago
|
||
I still can reproduce the original reported bug.
Note that there should be a
7b) hit enter,
or use cursor down,
or click in the line after the pasted text
The attached patch does not work, it causes the application to crash on Linux,
because symbol "GetSpecialSibling" is undefined.
Comment 19•22 years ago
|
||
I could fix this "undefined symbol" problem by moving the new function further
down in the source file.
So I have to correct my previous statement:
This patch does have a positive effect on the editor behaviour.
Text that gets typed while the caret is positioned on the line after, will
indeed appear where it is expected.
But unfortunately, this patch does not fix bug 200416.
Comment 20•22 years ago
|
||
This patch also fixes bug 205528.
The patch was produced 9 months ago. I'd say we should no longer wait but get it in.
Comment 21•22 years ago
|
||
Comment on attachment 99156 [details] [diff] [review]
Work in progress patch.
David, what do you think (since kin is away currently)? Who else could review
it? Is kin's suggestion reasonable (to change more code), or could we land this
code?
Attachment #99156 -
Flags: superreview?(dbaron)
Updated•22 years ago
|
Attachment #99156 -
Flags: superreview?(dbaron)
Comment 22•22 years ago
|
||
This patch has no different logic, but it applies correctly to the current
trunk.
Attachment #99156 -
Attachment is obsolete: true
Updated•22 years ago
|
Attachment #123291 -
Flags: review?(dbaron)
Comment on attachment 123291 [details] [diff] [review]
Updated patch
This is a bit inefficient, since what you're doing is walking to the
last-in-flow, then (in GetSpecialSibling) walking back to the first-in-flow and
getting its special sibling. I think it might be better to change
FindPreviousSibling and FindPreviousAnonymousSibling by changing the
GetLastInFlow to if (IsFrameSpecial(...)) { GetLastSpecialSibling} and then
GetLastInFlow(...) -- I suspect the change would be good for the one other
caller.
But this change ought to work...
This is what I was thinking.
Attachment #123291 -
Attachment is obsolete: true
Updated•22 years ago
|
Attachment #123291 -
Flags: review?(dbaron)
Comment 25•22 years ago
|
||
I've tested all the testcases in this bug, and the one in bug 205528.
The patch works fine for me.
Comment 26•22 years ago
|
||
Adding layout peers to cc list.
Could you please review the small patch that kin originally created, and dbaron
rewrote to be more efficient? Thanks!
Attachment #123343 -
Flags: superreview?(roc+moz)
Attachment #123343 -
Flags: review?(roc+moz)
Attachment #123343 -
Flags: superreview?(roc+moz)
Attachment #123343 -
Flags: superreview+
Attachment #123343 -
Flags: review?(roc+moz)
Attachment #123343 -
Flags: review+
Comment on attachment 123343 [details] [diff] [review]
patch
Requesting 1.4 approval. This is reasonably low-risk since the current code is
rather badly broken. It is in core code and does carry some risk, though, but
it fixes a reasonably serious editor bug (and presumably similar bugs with DOM
manipulation from script).
Attachment #123343 -
Flags: approval1.4?
Comment 28•22 years ago
|
||
Comment on attachment 123343 [details] [diff] [review]
patch
a=asa (on behalf of drivers) for checkin to 1.4
Attachment #123343 -
Flags: approval1.4? → approval1.4+
Fix checked in to trunk, 2003-05-20 13:49 -0700.
I don't think ContentAppended is an issue (as kin suggested in comment 14) since
it appends to the parent. (It also should be better tested, since it's used in
page loading.) So marking bug as fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago → 22 years ago
Resolution: --- → FIXED
Comment 30•22 years ago
|
||
*** Bug 205528 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•