Merge "Actually use nodeOuterRange, selectNodes() has provided this forever"

This commit is contained in:
Trevor Parscal 2012-10-25 18:00:15 +00:00 committed by Gerrit Code Review
commit 551a30bc64

View file

@ -282,16 +282,7 @@ ve.dm.TransactionProcessor.processors.replace = function ( op ) {
prevCursor + opRemove.length - this.adjustment
), 'siblings' );
for ( i = 0; i < selection.length; i++ ) {
// .nodeRange is the inner range, we need the
// outer range (including opening and closing)
if ( selection[i].node.isWrapped() ) {
affectedRanges.push( new ve.Range(
selection[i].nodeRange.start - 1,
selection[i].nodeRange.end + 1
) );
} else {
affectedRanges.push( selection[i].nodeRange );
}
affectedRanges.push( selection[i].nodeOuterRange );
}
}
// Walk through the remove and insert data