X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=_source%2Fplugins%2Ftabletools%2Fdialogs%2FtableCell.js;h=1393e2460bc9a55dc40375ed7aab027ed4d1042a;hb=c9fdde67e6384bd5a66adc2b3bba5c4ce9db56c7;hp=7518ab152c55cc7cc9cd827ebe96b3de68e1e141;hpb=9873d66421922c7aef8be0f5d2ab51e547b19e66;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 } ); } }; } );