Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405546 )

Change subject: SurfaceSynchronizer: Clear author selections when unapplying
......................................................................

SurfaceSynchronizer: Clear author selections when unapplying

The selections we have are no longer valid, and we have no way
of knowing what the valid ones would be.

Bug: T185395
Change-Id: I075fc300142489f463f78d8864820ea53d3d080a
---
M src/dm/ve.dm.SurfaceSynchronizer.js
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/46/405546/1

diff --git a/src/dm/ve.dm.SurfaceSynchronizer.js 
b/src/dm/ve.dm.SurfaceSynchronizer.js
index 202997f..ddd679e 100644
--- a/src/dm/ve.dm.SurfaceSynchronizer.js
+++ b/src/dm/ve.dm.SurfaceSynchronizer.js
@@ -147,6 +147,12 @@
  * @inheritdoc
  */
 ve.dm.SurfaceSynchronizer.prototype.unapplyChange = function ( change ) {
+       var authorId, nullSelections = {};
+       // Author selections are potentially invalid now, null them all out
+       for ( authorId in this.authorSelections ) {
+               nullSelections[ authorId ] = new ve.dm.NullSelection( this.doc 
);
+       }
+       this.applyNewSelections( nullSelections );
        change.unapplyTo( this.surface );
 };
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I075fc300142489f463f78d8864820ea53d3d080a
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <r...@wikimedia.org>

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

Reply via email to