Skip to content

Commit

Permalink
Fixed: Deleting cells in nested table removes outer table cell.
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Dec 12, 2012
1 parent 22a9b02 commit fc2bf60
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions plugins/tabletools/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@
// So we have to take care to include a td we've entered only when we've
// walked into its children.

var parent = node.getAscendant( 'td' ) || node.getAscendant( 'th' );
if ( parent && !parent.getCustomData( 'selected_cell' ) ) {
CKEDITOR.dom.element.setMarker( database, parent, 'selected_cell', true );
retval.push( parent );
if ( node.type != CKEDITOR.NODE_ELEMENT || !node.is( CKEDITOR.dtd.table ) ) {
var parent = node.getAscendant( 'td', true ) || node.getAscendant( 'th', true );
if ( parent && !parent.getCustomData( 'selected_cell' ) ) {
CKEDITOR.dom.element.setMarker( database, parent, 'selected_cell', true );
retval.push( parent );
}
}
}
}
Expand Down

0 comments on commit fc2bf60

Please sign in to comment.