Opened 7 years ago

Closed 7 years ago

#4073 closed Bug (fixed)

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

Reported by: damo Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.1
Component: Core : Styles Version:
Keywords: IBM Confirmed Review+ Cc:

Description (last modified by fredck)

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 7 years ago.
2009-08-31-105015_793x484_scrot.png (27.9 KB) - added by tobiasz.cudnik 7 years ago.
4073_2.patch (6.5 KB) - added by garry.yao 7 years ago.
4073_3.patch (1.9 KB) - added by garry.yao 7 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 7 years ago by fredck

  • Description modified (diff)
  • Keywords Confirmed added
  • Milestone changed from CKEditor 3.x to CKEditor 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 7 years ago by tobiasz.cudnik

  • Owner set to tobiasz.cudnik
  • Status changed from new to assigned

comment:3 Changed 7 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 7 years ago by garry.yao

  • Component changed from General to Core : Styles
  • Keywords Pending removed
  • Owner changed from tobiasz.cudnik to garry.yao
  • Status changed from assigned to new

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

comment:5 Changed 7 years ago by garry.yao

  • Status changed from new to assigned

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 7 years ago by garry.yao

comment:6 Changed 7 years ago by garry.yao

  • Keywords Review? added

Changed 7 years ago by tobiasz.cudnik

comment:7 Changed 7 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 7 years ago by garry.yao

comment:8 Changed 7 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 7 years ago by fredck

  • Keywords Review- added; Review? removed

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

Changed 7 years ago by garry.yao

comment:10 Changed 7 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 7 years ago by fredck

  • Keywords Review+ added; Review? removed

comment:12 Changed 7 years ago by garry.yao

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed with #4539.

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy