mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Pick up annotations from the character on the left of the cursor
This commit is contained in:
parent
f098a24c8a
commit
f9ad5bed54
|
@ -152,7 +152,7 @@ es.SurfaceView.prototype.addInsertionAnnotation = function( annotation ) {
|
|||
|
||||
es.SurfaceView.prototype.loadInsertionAnnotations = function( annotation ) {
|
||||
this.insertionAnnotations =
|
||||
this.model.getDocument().getAnnotationsFromOffset( this.currentSelection.to );
|
||||
this.model.getDocument().getAnnotationsFromOffset( this.currentSelection.to - 1 );
|
||||
// Filter out annotations that aren't textStyles or links
|
||||
for ( var i = 0; i < this.insertionAnnotations.length; i++ ) {
|
||||
if ( !this.insertionAnnotations[i].type.match( /(textStyle\/|link\/)/ ) ) {
|
||||
|
|
Loading…
Reference in a new issue