Opened 11 years ago

Closed 10 years ago

#2556 closed Bug (worksforme)

Two paragraph elements added on a single Enter keystroke

Reported by: Christopher Crook Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.6.3
Keywords: Pending WorksForMe Cc:

Description

When hitting the enter key, two paragraph elements are inserted into the text. Also, if you hit delete, both elements are deleted, so you can not get the correct paragraph break unless you go into the source. This happens in FireFox 3 and IE 7.

Example: If I have some text in the editor, and I wish to add a sentence to preface the remarks, when I finish the statement and hit enter, there are 2 <p>&nbsp;</p> elements between the preface remarks and the original text. Hit delete and the original text is butting against my new sentence.

Attachments (5)

orignal_text.jpg (38.4 KB) - added by Christopher Crook 11 years ago.
Screenshot of original text
reload_check.jpg (29.9 KB) - added by Christopher Crook 11 years ago.
Screen shot of the reloaded text (after a save) to the database - in source for verification
before_enter.jpg (39.1 KB) - added by Christopher Crook 11 years ago.
Screen shot of the added title right before hitting the enter key
after_enter_display.jpg (35.3 KB) - added by Christopher Crook 11 years ago.
Screen shot of the text immediately after hitting the enter key
after_enter_source.jpg (35.1 KB) - added by Christopher Crook 11 years ago.
Screen shot of the source immediately after hitting enter

Download all attachments as: .zip

Change History (12)

comment:1 Changed 11 years ago by Christopher Crook

Addition information: If you go into source mode and then back out, the behavior is correct.

Example - visiting source mode:

  1. Toggle source mode on
  2. Toggle source mode off
  3. Type "Hello World." and hit enter
  4. Toggle source mode and see that the "Hello World" and the original text are each within their own <p> element with nothing between.

Example - without visiting source mode

  1. Type "Hello World." and hit enter
  2. Toggle source mode and find that there is a <p>&nbsp;</p> between the 2 texts

comment:2 Changed 11 years ago by Artur Formella

Keywords: Pending WorksForMe added; paragraph enter removed

I was unable to reproduce this problem in my FF3 and IE7 on Vista32. Could you write something more?

comment:3 Changed 11 years ago by Christopher Crook

I beleive this happens on first load and subsequent loads of the editor. I'll give the exact steps I preformed to have this happen the first time.

I wrote a paragraph within an FCKEditor and saved it. On save, I grab the inner text and save it to my database. Then I decided to title the paragraph, so I reopened the editor and my code set the inner text to what was saved in the database. (I know it was exactly the same because I checked both the database table and the source - but checking the source was on subsequent saves.) I placed the cursor at the first position of the box and typed the title to the article. AS I was typing, it was up against the original start of the text. Once I reached the end of the title, I hit the enter bar to end the line and push the original text down one line. It went down two. I hit delete and both lines disappeared. I hit enter again, and checking the source, I saw my new line was encapsulated within <p> tags and there was a <p>&nbsp;</p> element(s) between the new line of text and the oringal text

Changed 11 years ago by Christopher Crook

Attachment: orignal_text.jpg added

Screenshot of original text

Changed 11 years ago by Christopher Crook

Attachment: reload_check.jpg added

Screen shot of the reloaded text (after a save) to the database - in source for verification

Changed 11 years ago by Christopher Crook

Attachment: before_enter.jpg added

Screen shot of the added title right before hitting the enter key

Changed 11 years ago by Christopher Crook

Attachment: after_enter_display.jpg added

Screen shot of the text immediately after hitting the enter key

Changed 11 years ago by Christopher Crook

Attachment: after_enter_source.jpg added

Screen shot of the source immediately after hitting enter

comment:4 Changed 11 years ago by Christopher Crook

The screen shots I've added demonstrate exactly the steps involved. Note: Between the second shot and the third I came back to the page since the behavior is not present if you go into source mode before entering the new text.

comment:5 Changed 11 years ago by Christopher Crook

This is still occurring for us. In fact we shall probably reimplement the 2.4.3 version we had been using due to this bug.

Has anyone else experienced this issue?

comment:6 Changed 11 years ago by Frederico Caldeira Knabben

@Xitch13, please attach also the HTML you have in the database at your first save. Let us also know which browser you have there.

comment:7 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Resolution: worksforme
Status: newclosed

expired.

It might be due to some plugin or custom code that you have added to your editor. Reopen if you can provide the steps to reproduce in a clean install.

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