JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.1
[ckeditor.git] / _source / plugins / tabletools / dialogs / tableCell.js
index 7518ab1..1393e24 100644 (file)
@@ -24,11 +24,13 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
                        var onOk = function()\r
                        {\r
                                releaseHandlers( this );\r
-                               callback( this );\r
+                               callback( this, this._.parentDialog );\r
+                               this._.parentDialog.changeFocus( true );\r
                        };\r
                        var onCancel = function()\r
                        {\r
                                releaseHandlers( this );\r
+                               this._.parentDialog.changeFocus();\r
                        };\r
                        var releaseHandlers = function( dialog )\r
                        {\r
@@ -519,6 +521,13 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
                                        this.commitContent( cells[ i ] );\r
 \r
                                selection.selectBookmarks( bookmarks );\r
+\r
+                               // Force selectionChange event because of alignment style.\r
+                               var firstElement = selection.getStartElement();\r
+                               var currentPath = new CKEDITOR.dom.elementPath( firstElement );\r
+\r
+                               this._.editor._.selectionPreviousPath = currentPath;\r
+                               this._.editor.fire( 'selectionChange', { selection : selection, path : currentPath, element : firstElement } );\r
                        }\r
                };\r
        } );\r