Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/149640
Change subject: ve.ui.AnnotationInspector: Allow content insertion without annotating ...................................................................... ve.ui.AnnotationInspector: Allow content insertion without annotating Needed by Ie4a633ed in mediawiki/extensions/VisualEditor. I think this makes a bit more sense. Previously, you could only insert content if you were going to annotate it – now, you can always insert it *unless* you are going to de-annotate it. (Without this condition, clicking the 'remove' button of an inspector for a collapsed range would insert content, which is silly.) Change-Id: Icc2e368ac2f7951f53981d834029ef8b8f075d61 --- M modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/40/149640/1 diff --git a/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js b/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js index 40b7646..9b507b8 100644 --- a/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js +++ b/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js @@ -223,12 +223,12 @@ fragment = surfaceModel.getFragment( this.initialSelection, false ), selection = this.getFragment().getRange(); + if ( this.initialSelection.isCollapsed() && !remove ) { + insert = true; + } if ( remove ) { clear = true; } else if ( annotation ) { - if ( this.initialSelection.isCollapsed() ) { - insert = true; - } // Check if the initial annotation has changed, or didn't cover the whole fragment // to begin with if ( -- To view, visit https://gerrit.wikimedia.org/r/149640 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc2e368ac2f7951f53981d834029ef8b8f075d61 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits