Opened 14 years ago

Closed 11 years ago

#6453 closed Bug (duplicate)

Last whitespace ignored

Reported by: picot Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: Cc: pomu@…

Description

Hello, I use CKEditor with Windows XP, any browser. I just have a browser and a button to inspect the editor.getData() when clicked. I type a sentence in the browser, push the button, correct result.

<div>
First sentence with 0 whitepaces at the end</div>

I add a single whitespace at the end, push the button => it has not been taken into account. The alert display the same sentence, without any whitespace at the end. This is the bug !!! =>

<div>
First sentence with 1 whitepaces at the end</div>

I add 2 whitespaces at the end, push the button =>

<div>
First sentence with 2 whitepaces at the end&nbsp;</div>

Change History (5)

comment:1 Changed 14 years ago by Sa'ar Zac Elias

Keywords: whitespace removed

comment:2 Changed 13 years ago by pomu0325

Cc: pomu@… added

comment:3 Changed 13 years ago by Jakub Ś

Status: newconfirmed
Version: 3.4.13.0

This can be also tested by simply switching to source.

In CKEditor 3.0 and 3.0.1 when typing space after text and switching to source mode or using getData() you could see that space. It was lost when you switched from WYSIWYG to Source and back to WYSIWYG.
From CKEditor 3.0.2 whitespace after text is ignored.

comment:4 Changed 12 years ago by Jakub Ś

Please note that we talk about spaces pressed in WYSIWYG mode. User expects editor to change white spaces into &nbsp; so that output matched what user has entered.

comment:5 Changed 11 years ago by Jakub Ś

Resolution: duplicate
Status: confirmedclosed

Whether you are switching to source, use getData or use specialchar plugin result depends on browser - Webkit will insert &nbsp; on single space pressed. IE and FF will insert &nbsp; on second space pressed.

I'm closing this as dup of #8236.

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