Skip to content
Permalink
Browse files

Merge branch 't/10879' into major

  • Loading branch information...
Reinmar committed Oct 14, 2013
2 parents 4bafac0 + ccc47c4 commit 433e5eee91bdea6c994a3d6a4d0f80dd14b42d16
Showing with 13 additions and 2 deletions.
  1. +1 −0 CHANGES.md
  2. +12 −2 core/dom/range.js
@@ -15,6 +15,7 @@ Fixed Issues:
* [#10835](http://dev.ckeditor.com/ticket/10835): [Enhanced Image](http://ckeditor.com/addon/image2): Improved visibility of the resize handle.
* [#10836](http://dev.ckeditor.com/ticket/10836): [Enhanced Image](http://ckeditor.com/addon/image2): Preserve custom mouse cursor while resizing the image.
* [#10881](http://dev.ckeditor.com/ticket/10881): Various improvements to *Enter* key behaviour in nested editables.
* [#10879](http://dev.ckeditor.com/ticket/10879): Remove format should not leak from nested editable.

## CKEditor 4.3 Beta

@@ -982,6 +982,9 @@ CKEDITOR.dom.range = function( root ) {
enlargeable = container;
}

// Ensures that enlargeable can be indeed enlarged, if not it will be nulled.
enlargeable = getValidEnlargeable( enlargeable );

while ( enlargeable || sibling ) {
if ( enlargeable && !sibling ) {
// If we reached the common ancestor, mark the flag
@@ -1094,7 +1097,7 @@ CKEDITOR.dom.range = function( root ) {
}

if ( enlargeable )
enlargeable = enlargeable.getParent();
enlargeable = getValidEnlargeable( enlargeable.getParent() );
}

// Process the end boundary. This is basically the same
@@ -1225,7 +1228,7 @@ CKEDITOR.dom.range = function( root ) {
}

if ( enlargeable )
enlargeable = enlargeable.getParent();
enlargeable = getValidEnlargeable( enlargeable.getParent() );
}

// If the common ancestor can be enlarged by both boundaries, then include it also.
@@ -1321,6 +1324,13 @@ CKEDITOR.dom.range = function( root ) {
if ( tailBr )
this.setEndAfter( tailBr );
}

// Ensures that returned element can be enlarged by selection, null otherwise.
// @param {CKEDITOR.dom.element} enlargeable
// @returns {CKEDITOR.dom.element/null}
function getValidEnlargeable( enlargeable ) {
return enlargeable && enlargeable.type == CKEDITOR.NODE_ELEMENT && enlargeable.hasAttribute( 'contenteditable' ) ? null : enlargeable;
}
},

/**

0 comments on commit 433e5ee

Please sign in to comment.
You can’t perform that action at this time.