Opened 14 years ago
Closed 14 years ago
#6419 closed Bug (fixed)
IE: List creation by merging problem
Reported by: | Tobiasz Cudnik | Owned by: | Tobiasz Cudnik |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.5 |
Component: | General | Version: | |
Keywords: | IE IBM | Cc: | satya_minnekanti@… |
Description (last modified by )
IE: List creation by merging problem.
Steps to reproduce
- Type 3 lines
- Select all
- Apply the Bulleted List command
- Place a selection in the middle line
- Apply the Bulleted List command again, to remove this line from the list
- Select all
Result: A JS error is thrown.
Expected: Lists are merged into one containing 3 lines.
Reproduced in the IE8, strict. Most probably because the step 5 leaves bookmarks in the 1st and the 3rd line.
Attachments (4)
Change History (21)
comment:1 Changed 14 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 14 years ago by
Cc: | satya_minnekanti@… added |
---|---|
Keywords: | IBM added |
comment:3 Changed 14 years ago by
Owner: | set to Tobiasz Cudnik |
---|---|
Status: | confirmed → assigned |
comment:4 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:5 Changed 14 years ago by
Description: | modified (diff) |
---|
Changed 14 years ago by
Attachment: | 6419.patch added |
---|
comment:6 Changed 14 years ago by
Status: | assigned → review |
---|
comment:7 Changed 14 years ago by
Status: | review → review_failed |
---|
Problem is resolved, but now list ID always lost during transformation.
Changed 14 years ago by
Attachment: | 6419_2.patch added |
---|
comment:8 Changed 14 years ago by
Status: | review_failed → review |
---|
Although cloning IDs is not valid in the context of a document, i've reverted such behavior by extending the dom.node#clone method with ability to clone IDs without the cke_expando.
comment:9 Changed 14 years ago by
Status: | review → review_failed |
---|
Are we able to fix this without touching the "clone" method? I mean is the custom data still needed inside arrayToList?
comment:10 Changed 14 years ago by
We can fix it removing cke_expando manually, although there won't be any difference in the code size. Most important point here is that cloning expando is plain wrong.
There's no customData usage inside arrayToList, although it's needed in other places when used. If we would want to loose it, then we would need to reinvent whole logic of the list processing.
Changed 14 years ago by
Attachment: | 6419_3.patch added |
---|
comment:11 Changed 14 years ago by
Status: | review_failed → review |
---|
Third patch removes the _cke_expando always when cloning a node (right now it was cloned only in IE, thus this issue exists).
There can be more issues because of this, as nodes could became non-unique for such things as customData and event listeners.
comment:12 Changed 14 years ago by
Status: | review → review_failed |
---|
- function 'removeIds' could be further optimized based on 'includeChildren';
- Just a guess, but as IE treated expando as attributes, copyAttributes should be fixed also;
comment:13 Changed 14 years ago by
Regarding point 2, following TC confirms that copyAttributes doesn't copy the expando, which isn't actually weird, as copied are only children of an "attributes" property, which expando is not a child of.
var l = console.log; var a = new CKEDITOR.dom.element( 'p' ); var b = new CKEDITOR.dom.element( 'p' ); a.setCustomData( 'foo', 'bar' ); b.copyAttributes( a ); l( a.$._cke_expando ); l( b.$._cke_expando );
Changed 14 years ago by
Attachment: | 6419_4.patch added |
---|
comment:15 Changed 14 years ago by
Status: | review_failed → review |
---|
comment:16 Changed 14 years ago by
Status: | review → review_passed |
---|
comment:17 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with [6089].
The fault was inside the list splitting logic, which was cloning an UL element along with the _cke_expando ID. This expando was missleading next operations afterwards.