Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/182813

Change subject: Destroy the surface when switching away from VE mode
......................................................................

Destroy the surface when switching away from VE mode

In conjunction with I8715a45f this stops exceptions being thrown
if you switch from VE to Read mode with the find dialog still
open because a window scroll event hasn't been removed.

Not actually dependent on I8715a45f.

Change-Id: I745ce8034d1398ab3cda835a828950cb9be3cdd7
---
M demos/ve/demo.js
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/13/182813/1

diff --git a/demos/ve/demo.js b/demos/ve/demo.js
index 9f296c2..d3d53d3 100644
--- a/demos/ve/demo.js
+++ b/demos/ve/demo.js
@@ -281,6 +281,8 @@
                                html = ve.properInnerHtml( doc.body );
                                currentDir = model.getDir();
                        }
+                       this.surface.destroy();
+                       this.surface = null;
                        break;
 
                case 'edit':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I745ce8034d1398ab3cda835a828950cb9be3cdd7
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to