r102074 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102073‎ | r102074 | r102075 >
Date:23:49, 4 November 2011
Author:inez
Status:deferred
Tags:
Comment:
Small fix for cursor up (in first line) and down (in last line)
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/views/es.SurfaceView.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/views/es.SurfaceView.js
@@ -281,8 +281,14 @@
282282 top = this.$.position().top;
283283 do {
284284 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;
286288 break;
 289+ } else if ( fakePosition.top > top + this.dimensions.height ) {
 290+ this.cursor.initialLeft = null;
 291+ fakePosition.left = this.dimensions.width;
 292+ break;
287293 }
288294 fakePosition = this.documentView.getRenderedPositionFromOffset(
289295 this.documentView.getOffsetFromRenderedPosition( fakePosition )

Status & tagging log