mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Actually use nodeOuterRange, selectNodes() has provided this forever
Change-Id: Ie1d3cbb6e475248927d10f411cf383f701a3ad71
This commit is contained in:
parent
b8dc697f17
commit
f1dbdac3d8
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue