Opened 7 years ago

Closed 6 years ago

#6966 closed Bug (fixed)

<p> Tag Gets Added in Editor Text

Reported by: Sufiyan Ansari Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.5.3
Component: Core : Keystrokes Version: 3.0
Keywords: IE Cc:

Description

I have set the configuration file to not show <p> tag at the beginning and end of the editor text using the property "config.enterMode = CKEDITOR.ENTER_BR;". It works fine at initial load of editor control, however when I write something in the control and the use backspace key to remove it and then write something else then it adds the <p> tag at the beginning and end of the editor text.

Attachments (3)

Steps to Reproduce.doc (53.0 KB) - added by Sufiyan Ansari 7 years ago.
Steps to reproduce
6966.patch (1.5 KB) - added by Garry Yao 6 years ago.
6966_2.patch (1.3 KB) - added by Garry Yao 6 years ago.

Download all attachments as: .zip

Change History (12)

Changed 7 years ago by Sufiyan Ansari

Attachment: Steps to Reproduce.doc added

Steps to reproduce

comment:1 Changed 7 years ago by Garry Yao

Component: GeneralCore : Keystrokes
Keywords: IE added
Status: newpending

This should be an IE only problem? When backspace is pressed on empty content, browser forces a P element to be opened.

comment:2 Changed 7 years ago by Garry Yao

Status: pendingconfirmed
Version: 3.53.0

#7048 has been marked as DUP.

comment:3 Changed 7 years ago by Wiktor Walc

#6518 was marked as duplicate.

Exactly the same problem was fixed in FCKeditor with [879].

Changed 6 years ago by Garry Yao

Attachment: 6966.patch added

comment:4 Changed 6 years ago by Garry Yao

Owner: set to Garry Yao
Status: confirmedreview

Proposed patch works with the following case which unfortunately broken in [879]:

  1. Select all then press one character key.
  • Actual Result: New char inserted into a new paragraph.

comment:5 Changed 6 years ago by Wiktor Walc

Milestone: CKEditor 3.5.3

comment:6 Changed 6 years ago by Sa'ar Zac Elias

Status: reviewreview_failed

At least on enterMode BR:

  • Load an empty editor.
  • Focus the editor and type 3 characters.
  • Press BACKSPACE 3 times.

Note that a pargraph was created.

Changed 6 years ago by Garry Yao

Attachment: 6966_2.patch added

comment:7 Changed 6 years ago by Garry Yao

Status: review_failedreview

True, a robust hack takes even more time ;)

comment:8 Changed 6 years ago by Sa'ar Zac Elias

Status: reviewreview_passed

comment:9 Changed 6 years ago by Garry Yao

Resolution: fixed
Status: review_passedclosed

Fixed with [6486].

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