Index: trunk/extensions/VisualEditor/modules/es/tools/es.AnnotationButtonTool.js |
— | — | @@ -23,7 +23,9 @@ |
24 | 24 | es.AnnotationButtonTool.prototype.onClick = function() { |
25 | 25 | var surfaceView = this.toolbar.getSurfaceView(); |
26 | 26 | if ( this.inspector ) { |
27 | | - if ( !surfaceView.getModel().getSelection().getLength() ) { |
| 27 | + if ( surfaceView.getModel().getSelection().getLength() ) { |
| 28 | + this.toolbar.getSurfaceView().getContextView().openInspector( this.inspector ); |
| 29 | + } else { |
28 | 30 | if ( this.active ) { |
29 | 31 | var surfaceModel = surfaceView.getModel(), |
30 | 32 | documentModel = surfaceModel.getDocument(), |