Opened 13 years ago

Closed 11 years ago

#6840 closed Bug (expired)

Wysiwyg: When setting editor content to an empty paragraph, cursor is positioned after <br> and input ends up on second line

Reported by: Arne Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Firefox Cc:

Description

Go to demo page:

  1. Execute the following code (in Firebug). (If it's not reproduced on the first try, try a few more times)
CKEDITOR.instances.editor1.setData('<p><br></p>');
CKEDITOR.instances.editor1.focus();
  1. Now input some text.
  1. Observe that text ends up on the second line (after the br-tag).

This is caused by the onSelectionChangeFixBody function in the wysiwyg plugin, where Range::moveToElementEditEnd is called for the empty paragraph. Cursor then ends up after the br element.

Expected behavior : When paragraph is empty (contains br-tag), Range::moveToElementEditStart should be called.

Tested in Firefox 3.6.13, WinXP, CK version 3.4.2

Change History (2)

comment:1 Changed 13 years ago by Garry Yao

Keywords: Firefox added
Status: newpending

WFM on trunk.

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

Resolution: expired
Status: pendingclosed
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