https://www.mediawiki.org/wiki/Special:Code/MediaWiki/103490
Revision: 103490
Author: tparscal
Date: 2011-11-17 18:54:52 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
Fixed passing global offset to emit event, preventing render from re-rendering
because it thought the render-from point was well past it's length
Modified Paths:
--------------
trunk/extensions/VisualEditor/modules/es/es.TransactionProcessor.js
Modified: trunk/extensions/VisualEditor/modules/es/es.TransactionProcessor.js
===================================================================
--- trunk/extensions/VisualEditor/modules/es/es.TransactionProcessor.js
2011-11-17 18:50:48 UTC (rev 103489)
+++ trunk/extensions/VisualEditor/modules/es/es.TransactionProcessor.js
2011-11-17 18:54:52 UTC (rev 103490)
@@ -275,7 +275,8 @@
// Update the linear model
this.model.data.splice( this.cursor, op.data.length );
// Emit an update so things sync up
- node.emit( 'update', this.cursor );
+ var offset = this.model.getOffsetFromNode( node );
+ node.emit( 'update', this.cursor - offset );
}
};
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs