Index: trunk/extensions/VisualEditor/modules/es/views/es.SurfaceView.js |
— | — | @@ -281,8 +281,14 @@ |
282 | 282 | top = this.$.position().top; |
283 | 283 | do { |
284 | 284 | fakePosition.top += ++i * step; |
285 | | - if ( fakePosition.top < top || fakePosition.top > top + this.dimensions.height ) { |
| 285 | + if ( fakePosition.top < top ) { |
| 286 | + this.cursor.initialLeft = null; |
| 287 | + fakePosition.top = fakePosition.left = 0; |
286 | 288 | break; |
| 289 | + } else if ( fakePosition.top > top + this.dimensions.height ) { |
| 290 | + this.cursor.initialLeft = null; |
| 291 | + fakePosition.left = this.dimensions.width; |
| 292 | + break; |
287 | 293 | } |
288 | 294 | fakePosition = this.documentView.getRenderedPositionFromOffset( |
289 | 295 | this.documentView.getOffsetFromRenderedPosition( fakePosition ) |