Ticket #4710 (closed Bug: worksforme)

Opened 5 years ago

Last modified 4 years ago

Spurious table at end of input after trimming whitespace around table

Reported by: SilenceIT Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0.1
Keywords: Cc:

Description

A spurious table appears at end of input after trimming whitespace around a table (one created with intention of being the only content within the editor). Extra lines can also appear before and after.

Reproducible: Always

Happens on ckeditor.com/demo: Yes

Tested browsers: Firefox 3.0.14/Lin, Internet Explorer 6-8/Win, Chromium 4.0.222.8 (28958)/Lin

Tested CK versions: 3.0, 3.0.1

Affects: All except maybe Chromium; See note in steps.

Workarounds: So long as the user is aware of this bug, in most cases it's possible to trim out the extra content and save it as-is, so long as editor is not re-rendered. However, the moment the content is edited again, extra lines will reappear.

Steps to reproduce:

  • Start with a blank editor or with data already present; Remove all text.
  • Add a table, the default 3x2 will do fine, and add text into each cell.
  • Select middle row, center the text. In Fx, this causes a strange (but temporary) rendering issue.
  • Rerender the editor (either via source/un-source or by saving/re-editing or what have you).
  • Note there's an extra line before the table. Remove it. In IE, the line itself refuses to go away. In Chromium, you would have to ADD the line before this bug happens.
  • View the source; There is now a blank, invisible table at the end of the HTML source (In IE7, there's also a bunch of other cruft). There's also a blank line before the table again.

(Some steps may be spurious, but these make it happen all the time. I've had it happen just placing the table and removing the extra line that happens right then.)

This does not seem to occur (at least in Fx3) if the configuration is modified as follows:

config.enterMode = CKEDITOR.ENTER_BR;

config.shiftEnterMode = CKEDITOR.ENTER_P;

However, the extra <br> below the table can never be removed in this configuration.

This table is a problem due to other renderers (e.g. Word) seeing it and displaying it, particularly if the original table's attributes (such as border colour) were changed.

Attachments

sample output.txt (472 bytes) - added by SilenceIT 5 years ago.
Sample output/source of editor

Change History

Changed 5 years ago by SilenceIT

Sample output/source of editor

comment:1 Changed 4 years ago by fredck

  • Status changed from new to closed
  • Resolution set to worksforme

I'm not able to reproduce this issue with the current trunk. I remember we have been fixing related things, so maybe this one got fixed.

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