X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Ftable%2Fdialogs%2Ftable.js;h=215a373d4bfbf29834e47fa761f0c4b8e5264ed5;hp=6a082d25236bdc5db6fef0253952c1f90607bb0f;hb=941b0a9ba4e673e292510d80a5a86806994b8ea6;hpb=7cd80714081a8ffdf4a1a8d2c72f120ed5ef3d6d diff --git a/_source/plugins/table/dialogs/table.js b/_source/plugins/table/dialogs/table.js index 6a082d2..215a373 100644 --- a/_source/plugins/table/dialogs/table.js +++ b/_source/plugins/table/dialogs/table.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -68,6 +68,12 @@ For licensing, see LICENSE.html or http://ckeditor.com/license }, onOk : function() { + if ( this._.selectedElement ) + { + var selection = editor.getSelection(), + bms = editor.getSelection().createBookmarks(); + } + var table = this._.selectedElement || makeElement( 'table' ), me = this, data = {}; @@ -193,6 +199,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Insert the table element if we're creating one. if ( !this._.selectedElement ) editor.insertElement( table ); + // Properly restore the selection inside table. (#4822) + else + selection.selectBookmarks( bms ); return true; },