mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
preserve range after applying annotation
This commit is contained in:
parent
ab496f7bc9
commit
df4f017b21
Notes:
christian
2012-03-07 23:35:38 +00:00
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue