Index: trunk/extensions/VisualEditor/modules/es/models/es.DocumentModel.js |
— | — | @@ -474,7 +474,8 @@ |
475 | 475 | start = Math.max( 0, Math.min( this.data.length, range.start ) ); |
476 | 476 | end = Math.max( 0, Math.min( this.data.length, range.end ) ); |
477 | 477 | } |
478 | | - var data = this.data.slice( start, end ); |
| 478 | + // Work around IE bug: arr.slice( 0, undefined ) returns [] while arr.slice( 0 ) behaves correctly |
| 479 | + var data = end === undefined ? this.data.slice( start ) : this.data.slice( start, end ); |
479 | 480 | return deep ? es.copyArray( data ) : data; |
480 | 481 | }; |
481 | 482 | |
Index: trunk/extensions/VisualEditor/modules/es/bases/es.DocumentModelBranchNode.js |
— | — | @@ -209,7 +209,7 @@ |
210 | 210 | * @returns {Integer} Index of child node or -1 if node was not found |
211 | 211 | */ |
212 | 212 | es.DocumentModelBranchNode.prototype.indexOf = function( node ) { |
213 | | - return this.children.indexOf( node ); |
| 213 | + return es.arrayIndexOf( this.children, node ); |
214 | 214 | }; |
215 | 215 | |
216 | 216 | /** |
Index: trunk/extensions/VisualEditor/modules/es/bases/es.EventEmitter.js |
— | — | @@ -148,7 +148,7 @@ |
149 | 149 | if ( handlers.length === 1 && handlers[0] === listener ) { |
150 | 150 | delete this.events[type]; |
151 | 151 | } else { |
152 | | - var i = handlers.indexOf( listener ); |
| 152 | + var i = es.arrayIndexOf( handlers, listener ); |
153 | 153 | if ( i < 0 ) { |
154 | 154 | return this; |
155 | 155 | } |