https://www.mediawiki.org/wiki/Special:Code/MediaWiki/103479

Revision: 103479
Author:   tparscal
Date:     2011-11-17 18:05:14 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
Fix for issue identified in review of r103377 - this will make it so insertion 
at a structural offset will work even if the parent isn't the document

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:00:16 UTC (rev 103478)
+++ trunk/extensions/VisualEditor/modules/es/es.TransactionProcessor.js 
2011-11-17 18:05:14 UTC (rev 103479)
@@ -182,7 +182,8 @@
                es.insertIntoArray( this.model.data, this.cursor, op.data );
                this.applyAnnotations( this.cursor + op.data.length );
                node = this.model.getNodeFromOffset( this.cursor );
-               index = node.getIndexFromOffset( this.cursor );
+               offset = this.model.getOffsetFromNode( node );
+               index = node.getIndexFromOffset( this.cursor + offset );
                this.rebuildNodes( op.data, null, node, index );
        } else {
                node = this.model.getNodeFromOffset( this.cursor );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to