Ticket #6840 (closed Bug: expired)

Opened 3 years ago

Last modified 8 months ago

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

comment:1 Changed 3 years ago by garry.yao

  • Keywords Firefox added
  • Status changed from new to pending

WFM on trunk.

comment:2 Changed 8 months ago by Reinmar

  • Status changed from pending to closed
  • Resolution set to expired
Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy