jenkins-bot has submitted this change and it was merged.
Change subject: ve.init.mw.ViewPageTarget: Fix exception in deactivate().
......................................................................
ve.init.mw.ViewPageTarget: Fix exception in deactivate().
This caused the page to stay in a dimmed state because it would
throw an exception before tearDownSurface() and showPageContent()
would be called.
Bug: 46456
Change-Id: I91ad2b110c2c523a4bb367407e3f33a953328ab4
---
M modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
1 file changed, 9 insertions(+), 2 deletions(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
index b19070a..1bd9c0b 100644
--- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
@@ -266,8 +266,15 @@
this.restoreSkinTabs();
this.restoreSiteNotice();
this.hideSpinner();
- this.tearDownToolbarButtons();
- this.detachToolbarButtons();
+
+ if ( this.toolbarCancelButton ) {
+ // If deactivate is called before a successful
load, then
+ // setupToolbarButtons has not been called yet
and as such tearDownToolbarButtons
+ // would throw an error when trying call
methods on the button property (bug 46456)
+ this.tearDownToolbarButtons();
+ this.detachToolbarButtons();
+ }
+
this.resetSaveDialog();
this.hideSaveDialog();
this.detachSaveDialog();
--
To view, visit https://gerrit.wikimedia.org/r/55295
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I91ad2b110c2c523a4bb367407e3f33a953328ab4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits