Opened 13 years ago

Closed 11 years ago

Last modified 11 years ago

#8241 closed Bug (fixed)

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

Reported by: Patrick 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 (4)

comment:1 Changed 13 years ago by Jakub Ś

Status: newconfirmed
Summary: In Chrome and Safari, a <br /> is inserted in an empty text area when using BR enter modeIn Chrome, Safari and Opera a <br /> is inserted in an empty text area when using BR enter mode
Version: 3.6.13.0

Issue has been reproducible from CKE 3.0

comment:2 Changed 11 years ago by Piotrek Koszuliński

Resolution: fixed
Status: confirmedclosed

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

comment:3 in reply to:  2 Changed 11 years ago by Daniel

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 11 years ago by Piotrek Koszuliński

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