Opened 7 years ago

Closed 6 years ago

#7838 closed Bug (fixed)

Editing tables in editor causes rows to move or the tables to disappear

Reported by: Judith Julien-Alexander Owned by:
Priority: Normal Milestone:
Component: Core : Tables Version: 3.5.3
Keywords: Webkit Cc:

Description

While working with tables in the editor, I noticed that when I paste or delete text into an empty cell the top row moves to the last row. This appears to occur in Chrome 11 on a Mac, Safari and IE 9. When I check the source, the only thing I noticed is the following tags: <invalidtag charset="utf-8"></invalidtag>. I've also noticed that sometimes the table will disappear completely. This doesn't seem to occur with every table that I paste into the editor. But, this occurs whether I use shortcuts or use the paste functions on the toolbar to paste tables and text into the cells. The tags appear once I save changes that I've made or switch between source and editor view. I also tested in the demo editor on ckeditor.com site and the same problem occurs. So, I know it's not something with our program since I'm able to replicate it even on the CKeditor site. We only experience this problem with the latest version of the CKEditor which I believe is 3.6.

Attachments (3)

ckeditor_table.png (193.5 KB) - added by Judith Julien-Alexander 7 years ago.
Steps taken to produce error
sample table.docx (11.4 KB) - added by Judith Julien-Alexander 7 years ago.
Sample table in word document
html source.docx (16.1 KB) - added by Judith Julien-Alexander 7 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 7 years ago by Jakub Ś

Status: newpending

Since I was not able to reproduce the problem, could I ask you for a step by step test case (and perhaps for a sample file)?

Could you also tell me if this table is pasted from word, is it empty or initially has some text in cells? Is the issue reproducible in all samples or in a particular one (e.g ajax or replacebycode). Finally what sort of text is pasted to these cells?

Changed 7 years ago by Judith Julien-Alexander

Attachment: ckeditor_table.png added

Steps taken to produce error

Changed 7 years ago by Judith Julien-Alexander

Attachment: sample table.docx added

Sample table in word document

comment:2 Changed 7 years ago by Judith Julien-Alexander

The simplest and quickest way I was able to reproduce this problem was from the ckeditor.com site. Once on the site, I click the See the demo link which takes me to http://ckeditor.com/demo. I delete what's in the editor window and copy and paste the table. Please see ckeditor_table image for the steps I took. The first picture on the left shows how the table looks when I pasted it into the window. I don't do anything to the table. I then click Source from the toolbar and it shows that what was in the second row (green box) in the first picture is now the first row in the source. When I click Source again to return to normal view, it shows that the 2nd row is now the top row and what was the top row is now the last row. It did this just from clicking the source button.

When I do this in our tool, it happens with the source button, pasting text in using shortcut keys or the past functions from the toolbar, and just clicking the save button. The table and text that I paste into the editor doesn't come from Word, I get it from existing text in the tool and from pages from websites. Although I've added the table to the word document, I initially copied the table from a website that initially had some text. Since there isn't a save button on the ckeditor site, I wasn't able to replicate the disappearing table issue. It's reproducible in the replacebycode example. We don't use AJAX in conjunction with CKEditor in our applications.

Please let me know if you need any additional information.

Last edited 7 years ago by Judith Julien-Alexander (previous) (diff)

comment:3 Changed 7 years ago by Jakub Ś

Ok so we know that this issue occurs on IE9, Safari and Chrome 11 on Mac and you are using replace by code sample. The table comes from web site.

Could I ask you to provide me with such HTML file containing table that is causing the error.

Once again I could not reproduce the issue. Based on your image I have created such table:

	<table border="1">
		<tbody>
			<tr>
				<td>Testing to see if the ckeditor works in the wiki tool.</td>
				<td><font size="3"><font size="3"><a href="http://ctltdev.jhsph.edu/core/index.cfm/go/content.main/cid/200">Mouse Action</a></font></font></td>
				<td>Jimmy cracked corn and I don't care.</td>
			</tr>
			<tr>
				<td></td>
				<td><font size="3"><font size="3"><a href="http://ctltdev.jhsph.edu/core/index.cfm/go/content.main/cid/200">Click.</a></font></font></td>
				<td><font size="3"><font size="3"><a href="http://ctltdev.jhsph.edu/core/index.cfm/go/content.main/cid/200">Up Arrow or Down Arrow.</a></font></font></td>
			</tr>
			<tr>
				<td><font size="3"><font size="3"><a href="http://ctltdev.jhsph.edu/core/index.cfm/go/content.main/cid/200">Extend contiguous selection.</a></font></font></td>
				<td><font size="3"><font size="3"><a href="http://ctltdev.jhsph.edu/core/index.cfm/go/content.main/cid/200">Shift-Click or Drag over rows.</a></font></font></td>
				<td><font size="3"><font size="3"><a href="http://ctltdev.jhsph.edu/core/index.cfm/go/content.main/cid/200">Shift-Up Arrow or Shift-Down Arrow.</a></font></font></td>
			</tr>
			<tr>
				<td><font size="3"><font size="3"><a href="http://ctltdev.jhsph.edu/core/index.cfm/go/content.main/cid/200">Add row to selection/toggle rw selection.</a></font></font></td>
				<td><font size="3"><font size="3"><a href="http://ctltdev.jhsph.edu/core/index.cfm/go/content.main/cid/200">Control-Click</a></font></font></td>
				<td><font size="3"><font size="3"><a href="http://ctltdev.jhsph.edu/core/index.cfm/go/content.main/cid/200">Move lead selection with Control-Up Arrow or Control-Down Arrow, then use Space Bar to add to selection or Control-Space Bar to toggle row selection.</a></font></font></td>
			</tr>
		</tbody>
	</table>

Inserted it in HTML file, displayed this file in a browser and copied the table with (CRTL+A).

After copying the table I have tried to switch modes, paste some text from other web sites but no row was moved.

Having said all that - providing a test case file causing an error would be very nice.

Changed 7 years ago by Judith Julien-Alexander

Attachment: html source.docx added

comment:4 Changed 7 years ago by Judith Julien-Alexander

I've attached a word file with the original html for a different table and then the source after editing the table within ckeditor. I copied this html from the editor in one of our applications. In this instance, the table disappears when you save after copying text into one of the cells.

comment:5 in reply to:  4 Changed 7 years ago by Krzysztof Studnik

Keywords: Webkit added
Version: 3.63.5.3

Replying to jjulien:

I've attached a word file with the original html for a different table and then the source after editing the table within ckeditor. I copied this html from the editor in one of our applications. In this instance, the table disappears when you save after copying text into one of the cells.

I was able to reproduce issue with table, which is described in second word document. Issue is reproducible since CKE v3.5.3

  • opened demo page of CKEditor in Chrome/MacOS or Ubuntu
  • Cleared contents
  • opened Table sample
  • selected Example 1 and pasted into empty edit area of Editor
  • selected "Adult person" text from table and pasted it into first, empty cell in second row
  • Switched into Source mode and back

Result

  • the table structure was broken
  • when switched back to source mode, every content was converted into paragraphs Result sample code

Still, I am not able to reproduce initial issue with table row order.
@jjulien: Any hint with this would be appreciated.

comment:6 Changed 7 years ago by Judith Julien-Alexander

We're not able to replicate the moving rows problem with other tables. I'm not sure what is different with the table we provided you compared to the others that we tried. Even with the table we've been testing with, it appears it is no longer a problem in the ckeditor demo now. However, I was able to replicate the disappearing table with same sample. Maybe a change was made with the demo editor. Thank you for looking into this for us and we look forward to the disappearing table problem being resolved so we can upgrade to the latest version. Thanks.

comment:7 Changed 7 years ago by Jakub Ś

Status: pendingconfirmed

Ok to sum up. As described by @krst in comment5, there is a problem with disappearing table on Webkit on mac/ubuntu from CKEditor 3.5.3

comment:8 Changed 6 years ago by Judith Julien-Alexander

Would you be able to tell me when this problem might be resolved? Thanks.

comment:9 Changed 6 years ago by Jakub Ś

Resolution: fixed
Status: confirmedclosed

This issue is no longer reproducible in latest CKEditor 3.6.2

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