jenkins-bot has submitted this change and it was merged.
Change subject: Always remove the annotation when the remove button is clicked
......................................................................
Always remove the annotation when the remove button is clicked
Remove weird check that prevented a removal from happening if the
subclass's getAnnotation() method returned null.
This caused a bug where if you inspected a link, typed an invalid
link target (e.g. '|'), then clicked the remove button (trash can icon),
the inspector would close but the link wouldn't be removed.
However, if you typed something that was a valid link target (or didn't
touch the input at all), the remove button would work as expected.
Change-Id: Ib6efc2a5827b109c6b38185e6d89b7bb29b13a75
---
M modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Esanders: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js
b/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js
index e9b11b2..d615eaf 100644
--- a/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js
+++ b/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js
@@ -167,7 +167,7 @@
set = false,
target = this.targetInput.getValue(),
annotation = this.getAnnotation(),
- remove = target === '' || ( data.action === 'remove' &&
!!annotation ),
+ remove = target === '' || data.action === 'remove',
surfaceModel = this.surface.getModel(),
fragment = surfaceModel.getFragment( this.initialSelection,
false ),
selection = surfaceModel.getSelection();
--
To view, visit https://gerrit.wikimedia.org/r/98113
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib6efc2a5827b109c6b38185e6d89b7bb29b13a75
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits