Index: trunk/extensions/VisualEditor/modules/es/tools/es.AnnotationButtonTool.js |
— | — | @@ -23,10 +23,13 @@ |
24 | 24 | es.AnnotationButtonTool.prototype.onClick = function() { |
25 | 25 | var surfaceView = this.toolbar.getSurfaceView(); |
26 | 26 | if ( this.inspector ) { |
27 | | - if ( !this.active && surfaceView.getModel().getSelection().getLength() ) { |
| 27 | + if ( surfaceView.getModel().getSelection().getLength() ) { |
| 28 | + this.toolbar.getSurfaceView().getContextView().openInspector( this.inspector ); |
| 29 | + } else { |
| 30 | + if ( !this.active ) { |
28 | 31 | surfaceView.annotate( 'set', this.annotation ); |
| 32 | + } |
29 | 33 | } |
30 | | - this.toolbar.getSurfaceView().getContextView().openInspector( this.inspector ); |
31 | 34 | } else { |
32 | 35 | surfaceView.annotate( this.active ? 'clear' : 'set', this.annotation ); |
33 | 36 | } |