Opened 15 years ago

Closed 14 years ago

#4710 closed Bug (worksforme)

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:


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 Yes

Tested browsers: Firefox 3.0.14/Lin, Internet Explorer 6-8/Win, Chromium (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 (1)

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

Download all attachments as: .zip

Change History (2)

Changed 15 years ago by SilenceIT

Attachment: sample output.txt added

Sample output/source of editor

comment:1 Changed 14 years ago by Frederico Caldeira Knabben

Resolution: worksforme
Status: newclosed

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 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy