Ticket #8241 (closed Bug: fixed)

Opened 3 years ago

Last modified 15 months ago

In Chrome, Safari and Opera a <br /> is inserted in an empty text area when using BR enter mode

Reported by: patrick.cook Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: Cc:

Description

If the CKEditor contains text and the enterMode is set to CKEDITOR.ENTER_BR, then when you remove all the text in wysiwyg mode and switch to source mode, the source contains a '<br/>' element. This behavior only happens in the latest versions of Chrome (12.0.742.122) and Safari (5.1). Firefox 5.0 correctly shows the source as empty.

Steps to reproduce:

  1. Create a textarea that contains some text such as 'test'
  2. Replace the textarea with a CKEditor using the following config:
    var CKEditorConfig = {
      enterMode: CKEDITOR.ENTER_BR
    }
    
  3. Highlight and delete all of the content in the CKEditor via the wysiwyg mode
  4. Click the "Source" button to switch to the source mode

Expected result:

  • The content is empty

Actual Result:

  • The content contains '<br/>'

Change History

comment:1 Changed 3 years ago by j.swiderski

  • Status changed from new to confirmed
  • Version changed from 3.6.1 to 3.0
  • Summary changed from In Chrome and Safari, a <br /> is inserted in an empty text area when using BR enter mode to In Chrome, Safari and Opera a <br /> is inserted in an empty text area when using BR enter mode

Issue has been reproducible from CKE 3.0

comment:2 follow-up: ↓ 3 Changed 16 months ago by Reinmar

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

I cannot reproduce this issue any more. I checked latest Chrome, FF and Safari 5.1.7.

comment:3 in reply to: ↑ 2 Changed 15 months ago by dakir111

This error still exists, I've checked 3.6.6.1.

You have to use the following Config: CKEDITOR.ENTER_BR

In Chrome, when cleaning the editor (Ctrl+A and del), there is still an <br>-Tag inside, which is visible with developer tools (and of course with getData()).

comment:4 Changed 15 months ago by Reinmar

  1. 3.6.6.1 is not a latest version. Please check CKEditor 4.2.
  2. Only result of getData() matters. With developer tools you can check internal editor's content, which is then processed when retrieving data.
Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy