Opened 8 years ago

Closed 8 years ago

#16840 closed Bug (invalid)

Empty paragraph breaks paragraph wrapping

Reported by: Rainer Reich 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 Jakub Ś 8 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 8 years ago by Rainer Reich

comment:2 Changed 8 years ago by Jakub Ś

Status: newpending
Version: 4.6.0

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 8 years ago by Jakub Ś

Attachment: works.swf added

comment:3 in reply to:  2 Changed 8 years ago by Rainer Reich

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 8 years ago by Jakub Ś

Resolution: invalid
Status: pendingclosed

@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 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy