JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.2.2
[ckeditor.git] / _source / plugins / table / dialogs / table.js
index 6ad826c..38652d4 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