Index: trunk/extensions/VisualEditor/modules/es/views/es.ContextView.js |
— | — | @@ -34,6 +34,12 @@ |
35 | 35 | |
36 | 36 | /* Methods */ |
37 | 37 | |
| 38 | +es.ContextView.prototype.update = function() { |
| 39 | + if ( this.$icon.is( ':visible' ) ) { |
| 40 | + this.set(); |
| 41 | + } |
| 42 | +}; |
| 43 | + |
38 | 44 | es.ContextView.prototype.set = function() { |
39 | 45 | this.$.removeClass( |
40 | 46 | 'es-contextView-position-below es-contextView-position-above ' + |
Index: trunk/extensions/VisualEditor/modules/es/views/es.SurfaceView.js |
— | — | @@ -147,6 +147,8 @@ |
148 | 148 | if ( _this.currentSelection.from !== _this.currentSelection.to ) { |
149 | 149 | _this.hideCursor(); |
150 | 150 | _this.documentView.drawSelection( _this.currentSelection ); |
| 151 | + // Update the context icon position |
| 152 | + _this.contextView.update(); |
151 | 153 | } else { |
152 | 154 | _this.showCursor(); |
153 | 155 | _this.documentView.clearSelection( _this.currentSelection ); |
— | — | @@ -157,6 +159,8 @@ |
158 | 160 | if ( this.currentSelection.from !== this.currentSelection.to ) { |
159 | 161 | this.hideCursor(); |
160 | 162 | this.documentView.drawSelection( this.currentSelection ); |
| 163 | + // Update the context icon position |
| 164 | + this.contextView.update(); |
161 | 165 | } else { |
162 | 166 | this.showCursor(); |
163 | 167 | this.documentView.clearSelection( this.currentSelection ); |