Changeset 6956
- Timestamp:
- 05/24/11 08:14:51 (2 years ago)
- Location:
- CKEditor/trunk
- Files:
-
- 2 edited
-
CHANGES.html (modified) (1 diff)
-
_source/plugins/table/dialogs/table.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/CHANGES.html
r6954 r6956 72 72 <li><a href="http://dev.ckeditor.com/ticket/7742">#7742</a> : [WebKit] Indent doesn't apply on empty document without editor focus in prior.</li> 73 73 <li><a href="http://dev.ckeditor.com/ticket/7801">#7801</a> : [Opera] Pasted paragraphs now split partial selected blocks.</li> 74 <li><a href="http://dev.ckeditor.com/ticket/6663">#6663</a> : Table caption that contains rich text is not anymore corrupted after edit with table dialog.</li> 74 75 <li>Updated the following language files:<ul> 75 76 <li><a href="http://dev.ckeditor.com/ticket/7834">#7834</a> : Dutch;</li> -
CKEditor/trunk/_source/plugins/table/dialogs/table.js
r6348 r6956 117 117 onOk : function() 118 118 { 119 if ( this._.selectedElement ) 120 { 121 var selection = editor.getSelection(), 122 bms = selection.createBookmarks(); 123 } 119 var selection = editor.getSelection(), 120 bms = selection.createBookmarks(); 124 121 125 122 var table = this._.selectedElement || makeElement( 'table' ), … … 249 246 if ( !this._.selectedElement ) 250 247 editor.insertElement( table ); 251 // Properly restore the selection inside table. (#4822) 252 else 253 selection.selectBookmarks( bms ); 248 249 // Properly restore the selection, (#4822) but don't break 250 // because of this, e.g. updated table caption. 251 try { selection.selectBookmarks( bms ); } catch( er ){} 254 252 255 253 return true; … … 601 599 setup : function( selectedTable ) 602 600 { 601 this.enable(); 602 603 603 var nodeList = selectedTable.getElementsByTag( 'caption' ); 604 604 if ( nodeList.count() > 0 ) 605 605 { 606 606 var caption = nodeList.getItem( 0 ); 607 608 var innerHtml = caption.getHtml().replace(/<br>\s*$/i, ''), 609 innerText = caption.getText(); 610 611 if ( innerHtml != innerText ) 612 { 613 this.disable(); 614 this.setValue( innerText ); 615 return; 616 } 617 607 618 caption = CKEDITOR.tools.trim( caption.getText() ); 608 619 this.setValue( caption ); … … 611 622 commit : function( data, table ) 612 623 { 624 if ( !this.isEnabled() ) 625 return; 626 613 627 var caption = this.getValue(), 614 628 captionElement = table.getElementsByTag( 'caption' );
Note: See TracChangeset
for help on using the changeset viewer.
