Actually use nodeOuterRange, selectNodes() has provided this forever

Change-Id: Ie1d3cbb6e475248927d10f411cf383f701a3ad71
This commit is contained in:
Catrope 2012-10-22 17:48:22 -07:00
parent b8dc697f17
commit f1dbdac3d8

View file

@ -270,16 +270,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