Opened 3 weeks ago

Closed 2 weeks ago

#16840 closed Bug (invalid)

Empty paragraph breaks paragraph wrapping

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

Description

Steps to reproduce

  1. Set <p></p> as content of the contenteditable element
  2. Click into the editor
  3. Start typing

Expected result

The typed text is wrapped by a <p></p> tag.

Actual result

The typed text is not wrapped but inserted before the <p></p>. When hitting the Enter-key a new paragraph is inserted and from then on everything gets wrapped.

Environment

Tested with Google Chrome Version 56.0.2924.76 (64-bit) and Firefox ESR 45.7.0 using Ubuntu 16.10 on ckeditor.com

Attachments (1)

works.swf (1.9 MB) - added by j.swiderski 2 weeks ago.

Download all attachments as: .zip

Change History (5)

comment:2 follow-up: Changed 2 weeks ago by j.swiderski

  • Status changed from new to pending
  • Version 4.6.0 deleted

I have just installed latest Ubuntu with latest Chrome and can't confirm your findings. Please see attached video.

In my simple test I have used the following code:

window.setTimeout(function(){
	CKEDITOR.instances.editor1.setData('<p></p>', 
	{ callback : 
		function(){
			CKEDITOR.instances.editor1.focus();
		}
	}); 
}, 3000);

Please provide exact steps to reproduce this problem and please also reproduce it in standalone, default CKEditor not integrated into your application to exclude the influence of any third-party scripts or third-party editor plugins.

Changed 2 weeks ago by j.swiderski

comment:3 in reply to: ↑ 2 Changed 2 weeks ago by rreich

I can reproduce this behavior in the demo on ckeditor.com using Google Chrome developer tools to set the html content of the contenteditable element directly to <p></p>.

But you're right: when using setData the paragraph will contain a br and the problem does not occur.

Maybe we broke the dataprocessor in our CKEditor usage so that no br is inserted. If it is not possible to insert an empty paragraph (without exploiting the developer tools) into the CKEditor using api, copy'n'paste and the like this ticket can be closed, I guess.

Thank you and sorry for the inconvenience!

comment:4 Changed 2 weeks ago by j.swiderski

  • Resolution set to invalid
  • Status changed from pending to closed

@rreich no problem. It's important we got to the bottom of this. Anyway setting content in devtools directly is a little bit too far fetched :)

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