Mooeypoo has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/198428

Change subject: Use the correct fragment for annotation selections
......................................................................

Use the correct fragment for annotation selections

We were calling a fragment from the initial selection, but checking
the range from another fragment. This caused the range to appear
collapsed even though it actually is not.

Bug: T93363
Change-Id: Ic5802b2a249f48686387aa05a6ead6d8ac0965bb
---
M src/ui/inspectors/ve.ui.AnnotationInspector.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/28/198428/1

diff --git a/src/ui/inspectors/ve.ui.AnnotationInspector.js 
b/src/ui/inspectors/ve.ui.AnnotationInspector.js
index 29aa526..223bbe6 100644
--- a/src/ui/inspectors/ve.ui.AnnotationInspector.js
+++ b/src/ui/inspectors/ve.ui.AnnotationInspector.js
@@ -260,7 +260,7 @@
                                remove = this.shouldRemoveAnnotation() || 
data.action === 'remove',
                                surfaceModel = this.getFragment().getSurface(),
                                fragment = surfaceModel.getFragment( 
this.initialSelection, false ),
-                               selection = this.getFragment().getSelection();
+                               selection = fragment.getSelection();
 
                        if (
                                !( selection instanceof ve.dm.LinearSelection ) 
||

-- 
To view, visit https://gerrit.wikimedia.org/r/198428
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5802b2a249f48686387aa05a6ead6d8ac0965bb
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <mor...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to