Opened 10 years ago
Last modified 8 years ago
#12480 review Bug
Error in console after removing formatting and disabling selection as a list item.
Reported by: | Artur Delura | Owned by: | kkrzton |
---|---|---|---|
Priority: | Nice to have (we want to work on it) | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | Cc: |
Description (last modified by )
Browsers: Chrome, FF and IE9+
- Open editor with following content and selection:
<ol> <li>hello</li> <li>moto</li> <li><strong>[:D]</strong></li> </ol>
- Click "Remove format" button.
- Press "Ordered List" or "Unordered List" button.
Actual result:
There is an error in console: TypeError: node is null range.js:1724
this.setStart( node.getParent(), node.getIndex() );
Change History (15)
comment:1 Changed 10 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 10 years ago by
Version: | → 4.0 |
---|
comment:3 Changed 10 years ago by
Description: | modified (diff) |
---|---|
Status: | new → confirmed |
Version: | 4.0 → 3.0 |
comment:4 Changed 9 years ago by
Milestone: | → CKEditor 4.5.7 |
---|
comment:5 Changed 9 years ago by
Owner: | set to kkrzton |
---|---|
Status: | confirmed → assigned |
comment:6 Changed 9 years ago by
For html like this (with :D selected):
<ol> <li>hello</li> <li>moto</li> <li>:D</li> </ol>
During element manipulation (e.g. list/unlist) selection is bookmarked as follows:
<ol> <li>hello</li> <li>moto</li> <li><span id="cke_bm_204S" style="display:none"> </span>:D<span id="cke_bm_204E" style="display:none"> </span></li> </ol>
so the bookmarks are inside li element.
When applying remove format to the above selection, bookmarks are moved outside li element:
<ol> <li>hello</li> <li>moto</li> <span data-cke-bookmark="1" style="display: none;"> </span> <li>:D</li> </ol> <span data-cke-bookmark="1" style="display: none;"> </span>
and so it breaks further processing.
comment:8 Changed 9 years ago by
Status: | assigned → review |
---|
Changes in t/12480.
This fix adds range clone on which removing format is processed (nothing changes in the process itself). The range clone is enlarged during the process which is the cause of change in placement of selection bookmarks (as mentioned in earlier comment). The original range is shrinked so its start and end containers points to selected text (and not the containing nodes which may be removed by removeformat).
Selection is restored based on original range which assures it contains as little additional elements as possible. There is one exception for containers with conteneteditable elements which should use enlarged range for selection restoring.
comment:9 Changed 9 years ago by
Milestone: | CKEditor 4.5.7 → CKEditor 4.5.8 |
---|
comment:10 Changed 9 years ago by
Milestone: | CKEditor 4.5.8 → CKEditor 4.5.9 |
---|
comment:11 Changed 9 years ago by
Milestone: | CKEditor 4.5.9 → CKEditor 4.5.10 |
---|
comment:12 Changed 8 years ago by
Milestone: | CKEditor 4.5.10 → CKEditor 4.5.11 |
---|
Moving tickets to the next milestone.
comment:13 Changed 8 years ago by
Milestone: | CKEditor 4.5.11 → CKEditor 4.6.1 |
---|
comment:14 Changed 8 years ago by
Milestone: | CKEditor 4.6.1 → CKEditor 4.6.2 |
---|
Moving to 4.6.2 minor release, as 4.6.1 is mostly about polishing 4.6.0.
comment:15 Changed 8 years ago by
Milestone: | CKEditor 4.6.2 |
---|---|
Priority: | Normal → Nice to have (we want to work on it) |
Moving to the nice to have list.
I was able to reproduce this problem from CKEditor 3.0 in every browser except IE8.