JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.3.2
[ckeditor.git] / _source / plugins / table / dialogs / table.js
index 87e55df..ddd47f5 100644 (file)
@@ -43,6 +43,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                        }\r
                                        else if ( ranges.length > 0 )\r
                                        {\r
+                                               // Webkit could report the following range on cell selection (#4948):\r
+                                               // <table><tr><td>[&nbsp;</td></tr></table>]\r
+                                               if ( CKEDITOR.env.webkit )\r
+                                                       ranges[ 0 ].shrink( CKEDITOR.NODE_ELEMENT );\r
+\r
                                                var rangeRoot = ranges[0].getCommonAncestor( true );\r
                                                selectedTable = rangeRoot.getAscendant( 'table', true );\r
                                        }\r
@@ -227,6 +232,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                                        id : 'txtRows',\r
                                                                                        'default' : 3,\r
                                                                                        label : editor.lang.table.rows,\r
+                                                                                       required : true,\r
                                                                                        style : 'width:5em',\r
                                                                                        validate : function()\r
                                                                                        {\r
@@ -252,6 +258,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                                        id : 'txtCols',\r
                                                                                        'default' : 2,\r
                                                                                        label : editor.lang.table.columns,\r
+                                                                                       required : true,\r
                                                                                        style : 'width:5em',\r
                                                                                        validate : function()\r
                                                                                        {\r
@@ -568,6 +575,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                        {\r
                                                                                if ( this.getValue() )\r
                                                                                        selectedTable.setAttribute( 'summary', this.getValue() );\r
+                                                                               else\r
+                                                                                       selectedTable.removeAttribute( 'summary' );\r
                                                                        }\r
                                                                }\r
                                                        ]\r