r113675 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113674‎ | r113675 | r113676 >
Date:22:04, 12 March 2012
Author:rmoen
Status:deferred
Tags:
Comment:
small fix: getSelectionRange was breaking the surface layer, changed to saved state member
Modified paths:
  • /trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Surface.js (modified) (history)
  • /trunk/extensions/VisualEditor/modules/ve/ui/ve.ui.Context.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Surface.js
@@ -150,7 +150,7 @@
151151
152152 ve.ce.Surface.prototype.loadInsertionAnnotations = function( annotation ) {
153153 this.insertionAnnotations =
154 - this.model.getDocument().getAnnotationsFromOffset( this.getSelectionRange().to - 1 );
 154+ this.model.getDocument().getAnnotationsFromOffset( this.currentSelection.to - 1 );
155155 // Filter out annotations that aren't textStyles or links
156156 for ( var i = 0; i < this.insertionAnnotations.length; i++ ) {
157157 if ( !this.insertionAnnotations[i].type.match( /(textStyle\/|link\/)/ ) ) {
Index: trunk/extensions/VisualEditor/modules/ve/ui/ve.ui.Context.js
@@ -95,9 +95,6 @@
9696 var selection = this.surfaceView.getModel().getSelection(),
9797 offset;
9898 this.position = null;
99 -
100 - console.log( this.surfaceView.getSelectionRect() );
101 -
10299 if ( selection.from < selection.to ) {
103100 var $lastRange = this.surfaceView.$.find( '.es-contentView-range:visible:last' );
104101 if ( $lastRange.length ) {

Status & tagging log