mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
Fix transact event handle in ve.dm.SurfaceFragment to handle array of transactions being passed as the argument (instead of just one transaction as it was before).
Change-Id: Ic8f26424594cbd4a89da7e4eefb825977f440786
This commit is contained in:
parent
59815c2548
commit
053d5ffa5f
|
@ -50,10 +50,12 @@ ve.dm.SurfaceFragment = function ( surface, range, autoSelect ) {
|
|||
* This keeps the range of this fragment valid, even while other transactions are being processed.
|
||||
*
|
||||
* @method
|
||||
* @param {ve.dm.Transaction} tx Transaction that's just been processed
|
||||
* @param {ve.dm.Transaction[]} txs Transactions that's just been processed
|
||||
*/
|
||||
ve.dm.SurfaceFragment.prototype.onTransact = function( tx ) {
|
||||
this.range = tx.translateRange( this.range );
|
||||
ve.dm.SurfaceFragment.prototype.onTransact = function( txs ) {
|
||||
for( var i = 0; i < txs.length; i++ ) {
|
||||
this.range = txs[i].translateRange( this.range );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue