Index: trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Surface.js |
— | — | @@ -31,7 +31,6 @@ |
32 | 32 | // Surface Observer |
33 | 33 | this.surfaceObserver = new ve.ce.SurfaceObserver( this.documentView ); |
34 | 34 | this.surfaceObserver.on( 'select', function( selection ) { |
35 | | - |
36 | 35 | if ( selection !== null ) { |
37 | 36 | // Keep a copy of the current selection on hand |
38 | 37 | _this.currentSelection = selection.clone(); |
Index: trunk/extensions/VisualEditor/modules/ve/ui/tools/ve.ui.AnnotationButtonTool.js |
— | — | @@ -23,8 +23,8 @@ |
24 | 24 | ve.ui.AnnotationButtonTool.prototype.onClick = function() { |
25 | 25 | var surfaceView = this.toolbar.getSurfaceView(); |
26 | 26 | if ( this.inspector ) { |
27 | | - if ( surfaceView.getModel().getSelection().getLength() ) { |
28 | | - this.toolbar.getSurfaceView().getContextView().openInspector( this.inspector ); |
| 27 | + if( surfaceView.surfaceObserver.range.getLength() ) { |
| 28 | + this.toolbar.getSurfaceView().contextView.openInspector( this.inspector ); |
29 | 29 | } else { |
30 | 30 | if ( this.active ) { |
31 | 31 | var surfaceModel = surfaceView.getModel(), |
Index: trunk/extensions/VisualEditor/modules/ve/ui/inspectors/ve.ui.LinkInspector.js |
— | — | @@ -8,7 +8,6 @@ |
9 | 9 | ve.ui.LinkInspector = function( toolbar, context ) { |
10 | 10 | // Inheritance |
11 | 11 | ve.ui.Inspector.call( this, toolbar, context ); |
12 | | - |
13 | 12 | // Properties |
14 | 13 | this.$clearButton = $( '<div class="es-inspector-button es-inspector-clearButton"></div>' ) |
15 | 14 | .prependTo( this.$ ); |