Opened 15 years ago

Closed 14 years ago

#4073 closed Bug (fixed)

The Text and Table template will not copy to the editor text area

Reported by: Damian Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.1
Component: Core : Styles Version:
Keywords: IBM Confirmed Review+ Cc:

Description (last modified by Frederico Caldeira Knabben)

The Text and Table template will not be copied to the CKEditor text area. This is a problem for IE, only.

Steps to reproduce:

  1. IE6, IE7, or IE8.
  2. Go to CK Editor nightly build => check the demos => Create and destroy editor instances for Ajax applications.
  3. Place the cursor in the CK Editor text area.
  4. Click the Template toolbar icon and select Text and Table.

Expected result:
The Text and Table template is copied to the text area, ready for editing.

Actual result:
The Text and Table template appears to be copied to the text area and is then immediately deleted.

Note 1: This scenario works if the browser is FF3 and Safari.

Note 2: If Replace actual contents option is unchecked, this problem does not occur.

Attachments (4)

4073.patch (4.6 KB) - added by Garry Yao 15 years ago.
2009-08-31-105015_793x484_scrot.png (27.9 KB) - added by Tobiasz Cudnik 15 years ago.
4073_2.patch (6.5 KB) - added by Garry Yao 15 years ago.
4073_3.patch (1.9 KB) - added by Garry Yao 14 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 15 years ago by Frederico Caldeira Knabben

Description: modified (diff)
Keywords: Confirmed added
Milestone: CKEditor 3.xCKEditor 3.1

Confirmed. It happens with that template only, but with the "Strange Template" the caret is positioned in the wrong place (inside a paragraph added before it automagically).

comment:2 Changed 15 years ago by Tobiasz Cudnik

Owner: set to Tobiasz Cudnik
Status: newassigned

comment:3 Changed 15 years ago by Tobiasz Cudnik

Keywords: Pending added

Seem to be fixed with [4030]. I would like to ask for one more confirmation.

comment:4 Changed 15 years ago by Garry Yao

Component: GeneralCore : Styles
Keywords: Pending removed
Owner: changed from Tobiasz Cudnik to Garry Yao
Status: assignednew

It still happened on IE6 for me, I'm taking over this ticket.

comment:5 Changed 15 years ago by Garry Yao

Status: newassigned

E.g. After insert 'Strange Template', document result in:

^<table>....</table> //For IE
<table><tr><td><h3>^....</table> //For Non-IE

After auto fixing for body logics, it becomes the following, which is wicked:

<p><table>....</table>^</p>

The bug is caused by a bug of range::enlarge which was called inside 'onSelectionChangeFixBody' function.

Changed 15 years ago by Garry Yao

Attachment: 4073.patch added

comment:6 Changed 15 years ago by Garry Yao

Keywords: Review? added

Changed 15 years ago by Tobiasz Cudnik

comment:7 Changed 15 years ago by Tobiasz Cudnik

Keywords: Review- added; Review? removed

I'm still getting this error in IE6 strict after applying the patch.

After first template insertion, it's just truncated. On second try - there is a JS error, which screenshot i'm attaching.

Changed 15 years ago by Garry Yao

Attachment: 4073_2.patch added

comment:8 Changed 15 years ago by Garry Yao

Keywords: Review? added; Review- removed

The second patch is trying to avoid the problem at the first place by manually placing the cursor after each template is applied with insert mode, so the 'onSelectionChangeFixBody' would never bother it.
While the changes from the first patch is still a problem, even a serious one, so it could be also reviewed with this ticket.

comment:9 Changed 14 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

There are some conflicts with this patch now. It should be reviewed.

Changed 14 years ago by Garry Yao

Attachment: 4073_3.patch added

comment:10 Changed 14 years ago by Garry Yao

Keywords: Review? added; Review- removed

Update the patch to trunk.
Note that the range issue would better to be handled by another ticket.

comment:11 Changed 14 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:12 Changed 14 years ago by Garry Yao

Resolution: fixed
Status: assignedclosed

Fixed with #4539.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy