diff --git a/modules/ve/dm/ve.dm.SurfaceFragment.js b/modules/ve/dm/ve.dm.SurfaceFragment.js index 73dd03c977..88ff7294d2 100644 --- a/modules/ve/dm/ve.dm.SurfaceFragment.js +++ b/modules/ve/dm/ve.dm.SurfaceFragment.js @@ -520,7 +520,7 @@ ve.dm.SurfaceFragment.prototype.annotateContent = function ( method, nameOrAnnot annotations = [ annotation ]; } else { annotations = this.document.data.getAnnotationsFromRange( this.getRange(), true ) - .getComparableAnnotations( annotation ).get(); + .getAnnotationsByName( annotation.name ).get(); } } if ( this.getRange( true ).getLength() ) { diff --git a/modules/ve/ui/actions/ve.ui.AnnotationAction.js b/modules/ve/ui/actions/ve.ui.AnnotationAction.js index 184de52088..2b234d0b3f 100644 --- a/modules/ve/ui/actions/ve.ui.AnnotationAction.js +++ b/modules/ve/ui/actions/ve.ui.AnnotationAction.js @@ -78,7 +78,7 @@ ve.ui.AnnotationAction.prototype.toggle = function ( name, data ) { ); } else { existingAnnotations = surfaceModel - .getInsertionAnnotations().getComparableAnnotations( annotation ); + .getInsertionAnnotations().getAnnotationsByName( annotation.name ); if ( existingAnnotations.isEmpty() ) { surfaceModel.addInsertionAnnotations( annotation ); } else {