Index: trunk/extensions/VisualEditor/modules/es/es.TransactionProcessor.js |
— | — | @@ -240,6 +240,7 @@ |
241 | 241 | if ( es.DocumentModel.isStructuralOffset( this.model.data, this.cursor ) ) { |
242 | 242 | es.insertIntoArray( this.model.data, this.cursor, op.data ); |
243 | 243 | this.applyAnnotations( this.cursor + op.data.length ); |
| 244 | + |
244 | 245 | node = this.model.getNodeFromOffset( this.cursor ); |
245 | 246 | offset = this.model.getOffsetFromNode( node ); |
246 | 247 | index = node.getIndexFromOffset( this.cursor - offset ); |
— | — | @@ -248,11 +249,9 @@ |
249 | 250 | node = this.model.getNodeFromOffset( this.cursor ); |
250 | 251 | if ( node.getParent() === this.model ) { |
251 | 252 | offset = this.model.getOffsetFromNode( node ); |
252 | | - index = this.model.getIndexFromOffset( this.cursor - offset ); |
253 | 253 | } else { |
254 | 254 | node = this.getScope( node, op.data ); |
255 | 255 | offset = this.model.getOffsetFromNode( node ); |
256 | | - //index = node.getIndexFromOffset( this.cursor - offset ); |
257 | 256 | } |
258 | 257 | if ( es.DocumentModel.containsElementData( op.data ) ) { |
259 | 258 | // Perform insert on linear data model |