Ticket #3664 (closed Bug: fixed)

Opened 6 years ago

Last modified 5 years ago

Insert table in empty document add extra line

Reported by: garry.yao Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.1
Component: Core : Styles Version:
Keywords: Confirmed HasTest Review+ Cc:

Description (last modified by garry.yao) (diff)

Reproducing Procedures

  1. Open the replace by class example page in FF;
  2. Click on 'New Page' to empty the document;
  3. Insert a default table;
    • Expected Result:
      <table border="1" cellpadding="1" cellspacing="1" style="width: 200px;">
      ...
      </table>
      <p>
      	<br />
      </p>
      
    • Actual Result: There's an paragraph established before the table:
      <p>
      	<br />
      </p>
      <table border="1" cellpadding="1" cellspacing="1" style="width: 200px;">
      ...
      </table>
      <p>
      	<br />
      </p>
      

Attachments

3664.patch (2.3 KB) - added by garry.yao 6 years ago.
3664_2.patch (1.3 KB) - added by garry.yao 5 years ago.
3664_3.patch (1.2 KB) - added by garry.yao 5 years ago.

Change History

Changed 6 years ago by garry.yao

comment:1 Changed 6 years ago by garry.yao

  • Description modified (diff)

Not sure if we need to trim the last paragraph, so keep it in the expected result.

comment:2 Changed 6 years ago by garry.yao

  • Status changed from new to assigned
  • Keywords Review? added

comment:3 follow-up: ↓ 7 Changed 5 years ago by arczi

With this patch it is not possible to insert anything above the table.

comment:4 Changed 5 years ago by fredck

  • Keywords Review- added; Review? removed

The right way to check if we're in an empty block is by checking if the range is checkStartOfBlock "and" checkEndOfBlock.

comment:5 Changed 5 years ago by fredck

  • Milestone changed from CKEditor 3.0 to CKEditor 3.1

comment:6 Changed 5 years ago by garry.yao

  • Keywords HasTest Review? added; Review- removed

Ticket Test added at : http://ckeditor.t/tt/3664/1.html.

Changed 5 years ago by garry.yao

comment:7 in reply to: ↑ 3 Changed 5 years ago by garry.yao

Replying to arczi:

With this patch it is not possible to insert anything above the table.

The exitable table feature is a separate topic and should be handled by other tickets, the patch is about that.

comment:8 Changed 5 years ago by fredck

  • Keywords Review- added; Review? removed
  • The "children", "count", "firstChild" are still in the code (not used).
  • The "if" declaration at line 85 is missing the curly braces.

Changed 5 years ago by garry.yao

comment:9 Changed 5 years ago by garry.yao

  • Keywords Review? added; Review- removed

comment:10 Changed 5 years ago by fredck

  • Keywords Review+ added; Review? removed

comment:11 Changed 5 years ago by garry.yao

Fixed with [4344].

comment:12 Changed 5 years ago by garry.yao

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