X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Ftable%2Fdialogs%2Ftable.js;h=c6f8a05b22531308704eec08117eccd5bad00ce0;hp=7b06606adcac387ce190ff5e5ac580fa075367d5;hb=c9fdde67e6384bd5a66adc2b3bba5c4ce9db56c7;hpb=9873d66421922c7aef8be0f5d2ab51e547b19e66 diff --git a/_source/plugins/table/dialogs/table.js b/_source/plugins/table/dialogs/table.js index 7b06606..c6f8a05 100644 --- a/_source/plugins/table/dialogs/table.js +++ b/_source/plugins/table/dialogs/table.js @@ -79,11 +79,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( command == 'tableProperties' ) { - if ( ( selectedTable = editor.getSelection().getSelectedElement() ) ) - { - if ( selectedTable.getName() != 'table' ) - selectedTable = null; - } + if ( ( selectedTable = selection.getSelectedElement() ) ) + selectedTable = selectedTable.getAscendant( 'table', true ); else if ( ranges.length > 0 ) { // Webkit could report the following range on cell selection (#4948): @@ -122,7 +119,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( this._.selectedElement ) { var selection = editor.getSelection(), - bms = editor.getSelection().createBookmarks(); + bms = selection.createBookmarks(); } var table = this._.selectedElement || makeElement( 'table' ), @@ -169,7 +166,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license for ( i = 0 ; i < theRow.getChildCount() ; i++ ) { var th = theRow.getChild( i ); - if ( th.type == CKEDITOR.NODE_ELEMENT ) + // Skip bookmark nodes. (#6155) + if ( th.type == CKEDITOR.NODE_ELEMENT && !th.hasAttribute( '_cke_bookmark' ) ) { th.renameNode( 'th' ); th.setAttribute( 'scope', 'col' );