Index: trunk/extensions/VisualEditor/modules/es/bases/es.DocumentViewBranchNode.js |
— | — | @@ -189,13 +189,13 @@ |
190 | 190 | * @param {es.Range} range Range of content to draw selection around |
191 | 191 | */ |
192 | 192 | es.DocumentViewBranchNode.prototype.drawSelection = function( range ) { |
193 | | - var nodes = this.selectNodes( range, true ); |
| 193 | + var selectedNodes = this.selectNodes( range, true ); |
194 | 194 | for ( var i = 0; i < this.children.length; i++ ) { |
195 | | - if ( nodes.length && this.children[i] === nodes[0].node ) { |
196 | | - for ( var j = 0; j < nodes.length; j++ ) { |
197 | | - nodes[j].node.drawSelection( nodes[j].range ); |
| 195 | + if ( selectedNodes.length && this.children[i] === selectedNodes[0].node ) { |
| 196 | + for ( var j = 0; j < selectedNodes.length; j++ ) { |
| 197 | + selectedNodes[j].node.drawSelection( selectedNodes[j].range ); |
198 | 198 | } |
199 | | - i += nodes.length - 1; |
| 199 | + i += selectedNodes.length - 1; |
200 | 200 | } else { |
201 | 201 | this.children[i].clearSelection(); |
202 | 202 | } |