Opened 14 years ago

Closed 14 years ago

#5638 closed Bug (fixed)

‘ignoreEmptyParagraph’ configuration doesn't work in enterMode=BR

Reported by: Garry Yao Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone: CKEditor 3.4
Component: Core : Output Data Version: 3.0
Keywords: Confirmed Firefox HasPatch Cc: nospam@…

Description

Environment

Firefox, config.enterMode = CKEDITOR.ENTER_BR, config.ignoreEmptyParagraph = true;

Reproducing Procedures

  1. Open any of the sample page and click on 'New Page' to clear content.
  2. Swtich to source.
    • Actual Result: There's one single <br /> left in content .

Attachments (1)

5638.patch (841 bytes) - added by Garry Yao 14 years ago.

Download all attachments as: .zip

Change History (10)

Changed 14 years ago by Garry Yao

Attachment: 5638.patch added

comment:1 Changed 14 years ago by Garry Yao

Keywords: Review? added

comment:2 Changed 14 years ago by Garry Yao

Owner: set to Garry Yao
Status: newassigned

comment:3 in reply to:  2 Changed 14 years ago by giorez

Cc: nospam@… added

I tested your patch, but no luck to totally solve the issue. Pls see http://drupal.org/node/798932#comment-2979676. I'm using CKEditor 3.2.1.

comment:4 Changed 14 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review- added; Review? removed

I don't notice any problem about "text getting bumped down upon initial typing", but if the user inserts several empty lines at the end of the content, they go away one at a time with each switch between source & design, so we have a new problem.

As the bogus node is marked as "_moz_editor_bogus_node" maybe that can be used to filter it out in the node: in the getData method of the wysiwygarea plugin, after getting the initial content, test (only for gecko) if the last node of the DOM is a br and has this attribute and if it's true then replace it from the end of the document.

How does that sound?

comment:5 Changed 14 years ago by Garry Yao

they go away one at a time with each switch between source & design, so we have a new problem.

Unfortunately it's a bug that exists now, I've opened #5766 for it.

comment:6 in reply to:  4 Changed 14 years ago by Garry Yao

Keywords: Review- removed

Replying to alfonsoml:

As the bogus node is marked as "_moz_editor_bogus_node" maybe that can be used to filter it out in the node: in the getData method of the wysiwygarea plugin, after getting the initial content, test (only for gecko) if the last node of the DOM is a br and has this attribute and if it's true then replace it from the end of the document.

Firfox bogus nodes are imitated into normal BR, it's safe to just remove the last <br> of document.

But the problem itself is off the scope on this ticket, it should be instead discussed at #5293.

comment:7 Changed 14 years ago by Garry Yao

Keywords: HasPatch added

comment:8 Changed 14 years ago by Frederico Caldeira Knabben

Owner: changed from Garry Yao to Frederico Caldeira Knabben

This is definitely supposed to be handled by #5293.

comment:9 Changed 14 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

Confirmed it fixed at #5293.

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