Opened 11 years ago

Last modified 8 years ago

#10497 confirmed Bug

Empty lines are removed in enter mode BR - continuation

Reported by: Jakub Ś Owned by:
Priority: Normal Milestone:
Component: General Version: 4.1.1
Keywords: Cc:

Description (last modified by Jakub Ś)

This is continuation of http://dev.ckeditor.com/ticket/10146#comment:26.

Seems ticket isn't fully fixed. Problem can be reproduced in every browser.

To reproduce:

  1. Set enter mode to BR
  2. Clear editor contents and paste below code:
    <br />
    <br />
    <table border="1" cellpadding="1" cellspacing="1" style="width:500px">
     <tbody>
      <tr>
       <td>Table</td>
      </tr>
     </tbody>
    </table>
    <br />
    <br />
    <hr />
    
  3. Switch to WYSIWYG and then to source:
    &nbsp;
    <table border="1" cellpadding="1" cellspacing="1" style="width:500px">
    	<tbody>
    		<tr>
    			<td>Table</td>
    		</tr>
    	</tbody>
    </table>
    &nbsp;
    <hr />
    

Result: As you can see two BR's were changed into single &nbsp;.
If you were writing an article, created table and wanted to make some space above it then on page save you would end up with single &nbsp; which wasn't intended.

NOTE: This is happening if you use one or two BR's. If you use three BR's then result is "br br nbsp". Assuming that last Br has to be changed into nbsp, should it be "br nbsp" when two BR's are used?


It seems ticket #10146 hasn’t been fully fixed thus this one should be closed and the former reopened.
I have just found that if you paste above code into editor, behaviour will be different in IE. All other browsers change two BR’s into &nbsp; but IE does it in "one by one" style – it removes br and on second switch it turns last br into &nbsp;

Change History (8)

comment:1 Changed 11 years ago by Jakub Ś

Status: newconfirmed

comment:2 Changed 11 years ago by Jakub Ś

Description: modified (diff)

comment:3 Changed 10 years ago by Jakub Ś

Seems this sort of issue was first reported in #7779. It would be nice to know if this change was intended.

comment:4 Changed 10 years ago by Jakub Ś

Other issues that seem to be related to this one: #10431, #12209, #11392.

comment:5 Changed 9 years ago by Jakub Ś

#12917 was marked as duplicate.

comment:6 Changed 9 years ago by Stefan

When will the bug fixed?

comment:7 Changed 9 years ago by Piotrek Koszuliński

#12917 is not a bug and is not a duplicate of this ticket, so it cannot be fixed (see http://dev.ckeditor.com/ticket/12917#comment:4). As for #10497 - I will have a look on it, but as I said - it's a different issue.

comment:8 Changed 8 years ago by Jakub Ś

Please check workaround mentioned in #10146

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