Divec has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/353994 )
Change subject: ve.dm.SurfaceFragment#delete: Don't pre-build a sequence of transactions ...................................................................... ve.dm.SurfaceFragment#delete: Don't pre-build a sequence of transactions Change-Id: I1c79815d733b6fc5436325762410f5f301b5d382 --- M src/dm/ve.dm.SurfaceFragment.js M tests/ce/ve.ce.Surface.test.js 2 files changed, 7 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/94/353994/1 diff --git a/src/dm/ve.dm.SurfaceFragment.js b/src/dm/ve.dm.SurfaceFragment.js index c9d4a71..7d2c97b 100644 --- a/src/dm/ve.dm.SurfaceFragment.js +++ b/src/dm/ve.dm.SurfaceFragment.js @@ -1005,14 +1005,12 @@ ); if ( !tx.isNoOp() ) { // Move contents of endNode into startNode, and delete nodeToDelete - this.change( [ - tx, - ve.dm.TransactionBuilder.static.newFromInsertion( - this.document, - rangeAfterRemove.start, - endNodeData - ) - ] ); + this.change( tx ); + this.change( ve.dm.TransactionBuilder.static.newFromInsertion( + this.document, + rangeAfterRemove.start, + endNodeData + ) ); } } } diff --git a/tests/ce/ve.ce.Surface.test.js b/tests/ce/ve.ce.Surface.test.js index bb94d34..a6051ba 100644 --- a/tests/ce/ve.ce.Surface.test.js +++ b/tests/ce/ve.ce.Surface.test.js @@ -378,7 +378,7 @@ expectedData: function ( data ) { var paragraph = data.splice( 14, 5 ); data.splice( 13, 2 ); // remove the empty listItem - data.splice.apply( data, [ 14, 0 ].concat( paragraph, { type: 'list', attributes: { style: 'bullet' } }, { type: '/list' } ) ); + data.splice.apply( data, [ 14, 0 ].concat( paragraph ) ); }, expectedRangeOrSelection: new ve.Range( 15 ), msg: 'Non-empty multi-item list at end of document unwrapped by delete' -- To view, visit https://gerrit.wikimedia.org/r/353994 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c79815d733b6fc5436325762410f5f301b5d382 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Divec <da...@troi.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits