Skip to content
Permalink
Browse files

Merge branch 't/12729b'

  • Loading branch information...
Reinmar committed Mar 27, 2015
2 parents e8a747d + 6b15c0e commit 765a28c52f1c343706a6d977febdbabac51129d5
@@ -11,6 +11,7 @@ Fixed Issues:
* [#11982](http://dev.ckeditor.com/ticket/11982): Bullet added in wrong position after *enter* key pressed in nested list.
* [#13027](http://dev.ckeditor.com/ticket/13027): Fixed: Keyboard Navigation in dialogs with multiple tabs not following CI 162 instructions or [ARIA Authoring practices](http://www.w3.org/TR/2013/WD-wai-aria-practices-20130307/#tabpanel).
* [#12256](http://dev.ckeditor.com/ticket/12256): Fixed: Basic styles' classes are lost when pasting from MS Word if [basics styles](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-coreStyles_bold) were configured to use classes.
* [#12729](http://dev.ckeditor.com/ticket/12729): Incorrect structure created when merging block into list item on *Backspace* and *Delete*.

Other Changes:

@@ -907,6 +907,9 @@
joinWith = previous;
// Place cursor at the end of previous block.
cursor.moveToElementEditEnd( joinWith );

// And then just before end of closest block element (#12729).
cursor.moveToPosition( cursor.endPath().block, CKEDITOR.POSITION_BEFORE_END );
}
}

@@ -971,7 +974,7 @@
}
// Right at the end of list item.
else if ( range.checkBoundaryOfElement( block, CKEDITOR.END ) ) {
isAtEnd = 1;
isAtEnd = 2;
}


@@ -980,6 +983,16 @@
nextLine = range.clone();
nextLine.moveToElementEditStart( next );

// Moving `cursor` and `next line` only when at the end literally (#12729).
if ( isAtEnd == 2 ) {
cursor.moveToPosition( cursor.endPath().block, CKEDITOR.POSITION_BEFORE_END );

// Next line might be text node not wrapped in block element.
if ( nextLine.endPath().block ) {
nextLine.moveToPosition( nextLine.endPath().block, CKEDITOR.POSITION_AFTER_START );
}
}

joinNextLineToCursor( editor, cursor, nextLine );
evt.cancel();
}
@@ -329,10 +329,12 @@
* // Then test will look like:
* bender.testInputOut( 'sample1', function( input, output ){ ...test and assertion... });
*/
testInputOut: function( playground, fn ) {
testInputOut: function( playground, fn, trimSelection ) {
trimSelection = ( trimSelection === false ? false : true );

var source = bender.tools.getValueAsHtml( playground ).split( '=>' ),
input = source[ 0 ],
output = /\(no change\)/.test( source[ 1 ] ) ? input.replace( /\^|\[|\]/g, '' ) : source[ 1 ];
output = /\(no change\)/.test( source[ 1 ] ) ? ( trimSelection ? input.replace( /\^|\[|\]/g, '' ) : input ) : source[ 1 ];

fn( input, output );
},
@@ -1259,6 +1261,11 @@
fixZWS = ( 'fixZWS' in options ) ? options.fixZWS : true,
fixNbsp = ( 'fixNbsp' in options ) ? options.fixNbsp : true;

// On IE8- we need to get rid of expando attributes.
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 ) {
innerHtml = innerHtml.replace( / data-cke-expando="[^"]*"/g, '' );
}

if ( options.compareSelection ) {
innerHtml = innerHtml.replace( selectionMarkers, '<!--cke-range-marker-$1-->' );
}

0 comments on commit 765a28c

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