X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fdom%2Frange.js;h=477197ef053ced2de6cf8cd9d9a66d0be11bf83e;hb=4e70ea24db840898be8cc21c950363a52a2a6aba;hp=4c0067b856558a04050cf8eae0b6ed0c54cb3f88;hpb=4e90e78dc97789709ee7404359a5517540c27553;p=ckeditor.git diff --git a/_source/core/dom/range.js b/_source/core/dom/range.js index 4c0067b..477197e 100644 --- a/_source/core/dom/range.js +++ b/_source/core/dom/range.js @@ -359,7 +359,7 @@ CKEDITOR.dom.range = function( document ) if ( node.type == CKEDITOR.NODE_TEXT ) { // If there's any visible text, then we're not at the start. - if ( CKEDITOR.tools.trim( node.getText() ).length ) + if ( node.hasAscendant( 'pre' ) || CKEDITOR.tools.trim( node.getText() ).length ) return false; } else if ( node.type == CKEDITOR.NODE_ELEMENT ) @@ -1870,7 +1870,7 @@ CKEDITOR.dom.range = function( document ) return 0; } // Range enclosed entirely in an editable element. - else if ( node.is( 'body' ) + else if ( node.is( 'html' ) || node.getAttribute( 'contentEditable' ) == 'true' && ( node.contains( anotherEnd ) || node.equals( anotherEnd ) ) ) {