JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.6
[ckeditor.git] / _source / core / dom / range.js
index 4c0067b..477197e 100644 (file)
@@ -359,7 +359,7 @@ CKEDITOR.dom.range = function( document )
                        if ( node.type == CKEDITOR.NODE_TEXT )\r
                        {\r
                                // If there's any visible text, then we're not at the start.\r
-                               if ( CKEDITOR.tools.trim( node.getText() ).length )\r
+                               if ( node.hasAscendant( 'pre' ) || CKEDITOR.tools.trim( node.getText() ).length )\r
                                        return false;\r
                        }\r
                        else if ( node.type == CKEDITOR.NODE_ELEMENT )\r
@@ -1870,7 +1870,7 @@ CKEDITOR.dom.range = function( document )
                                                        return 0;\r
                                                }\r
                                                // Range enclosed entirely in an editable element.\r
-                                               else if ( node.is( 'body' )\r
+                                               else if ( node.is( 'html' )\r
                                                        || node.getAttribute( 'contentEditable' ) == 'true'\r
                                                        && ( node.contains( anotherEnd ) || node.equals( anotherEnd ) ) )\r
                                                {\r