X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ftabletools%2Fdialogs%2FtableCell.js;h=1393e2460bc9a55dc40375ed7aab027ed4d1042a;hb=refs%2Ftags%2Fv3.4.2;hp=7518ab152c55cc7cc9cd827ebe96b3de68e1e141;hpb=055b6b0792ce7dc53d47af606b367c04b927c2ab;p=ckeditor.git diff --git a/_source/plugins/tabletools/dialogs/tableCell.js b/_source/plugins/tabletools/dialogs/tableCell.js index 7518ab1..1393e24 100644 --- a/_source/plugins/tabletools/dialogs/tableCell.js +++ b/_source/plugins/tabletools/dialogs/tableCell.js @@ -24,11 +24,13 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) var onOk = function() { releaseHandlers( this ); - callback( this ); + callback( this, this._.parentDialog ); + this._.parentDialog.changeFocus( true ); }; var onCancel = function() { releaseHandlers( this ); + this._.parentDialog.changeFocus(); }; var releaseHandlers = function( dialog ) { @@ -519,6 +521,13 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) this.commitContent( cells[ i ] ); selection.selectBookmarks( bookmarks ); + + // Force selectionChange event because of alignment style. + var firstElement = selection.getStartElement(); + var currentPath = new CKEDITOR.dom.elementPath( firstElement ); + + this._.editor._.selectionPreviousPath = currentPath; + this._.editor.fire( 'selectionChange', { selection : selection, path : currentPath, element : firstElement } ); } }; } );