Ticket #4822: 4822.patch

File 4822.patch, 865 bytes (added by Garry Yao, 14 years ago)
  • _source/plugins/table/dialogs/table.js

     
    6868                        },
    6969                        onOk : function()
    7070                        {
     71                                if ( this._.selectedElement )
     72                                {
     73                                        var selection = editor.getSelection(),
     74                                                bms = editor.getSelection().createBookmarks();
     75                                }
     76
    7177                                var table = this._.selectedElement || makeElement( 'table' ),
    7278                                        me = this,
    7379                                        data = {};
     
    193199                                // Insert the table element if we're creating one.
    194200                                if ( !this._.selectedElement )
    195201                                        editor.insertElement( table );
     202                                // Properly restore the selection inside table. (#4822)
     203                                else
     204                                        selection.selectBookmarks( bms );
    196205
    197206                                return true;
    198207                        },
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy