jenkins-bot has submitted this change and it was merged.
Change subject: demo: Destroy the surface when switching away from VE mode
......................................................................
demo: 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(-)
Approvals:
Jforrester: Looks good to me, approved
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: I745ce8034d1398ab3cda835a828950cb9be3cdd7
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits