From df4f017b212a05a2f2047b6b361227284f814f41 Mon Sep 17 00:00:00 2001 From: christian Date: Wed, 7 Mar 2012 23:35:38 +0000 Subject: [PATCH] preserve range after applying annotation --- modules/ve/ce/ve.ce.Surface.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index c73e8ddaf2..d790806556 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -107,8 +107,7 @@ ve.ce.Surface.prototype.annotate = function( method, annotation ) { this.clearPollData(); - // show cursor - _this.showCursor(range.to); + _this.showSelection( range ); } else { if ( method === 'set' ) { this.addInsertionAnnotation( annotation ); @@ -638,6 +637,7 @@ ve.ce.Surface.getDOMHash = function( elem ) { ve.ce.Surface.prototype.handleDelete = function( backspace, isPartial ) { this.stopPolling(); + this.clearPollData(); var selection = this.getSelectionRange().clone(), sourceOffset, targetOffset,