jenkins-bot has submitted this change and it was merged.
Change subject: AnnotationInspector: Only show 'insert' when content is to be
inserted
......................................................................
AnnotationInspector: Only show 'insert' when content is to be inserted
Currently 'insert' means that a new annotation will be applied, which
is a little confusing. Everywhere else, 'insert' means insert new
contents. Just use 'done' unless new text is actually going to be
inserted (i.e., the inspector was opened on a collapsed selection).
Change-Id: I0ad81f565b585def4687437b317a15a75371b257
---
M src/ui/inspectors/ve.ui.AnnotationInspector.js
1 file changed, 2 insertions(+), 4 deletions(-)
Approvals:
Alex Monk: Looks good to me, but someone else must approve
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/src/ui/inspectors/ve.ui.AnnotationInspector.js
b/src/ui/inspectors/ve.ui.AnnotationInspector.js
index 9104254..5a7ba20 100644
--- a/src/ui/inspectors/ve.ui.AnnotationInspector.js
+++ b/src/ui/inspectors/ve.ui.AnnotationInspector.js
@@ -145,10 +145,8 @@
* @inheritdoc
*/
ve.ui.AnnotationInspector.prototype.getMode = function () {
- if ( this.fragment ) {
- // Trim the fragment before getting selected models to match
the behavior of
- // #getSetupProcess
- return
this.fragment.trimLinearSelection().getSelectedModels().length ? 'edit' :
'insert';
+ if ( this.initialSelection ) {
+ return this.initialSelection.isCollapsed() ? 'insert' : 'edit';
}
return '';
};
--
To view, visit https://gerrit.wikimedia.org/r/234279
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0ad81f565b585def4687437b317a15a75371b257
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits