mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 06:46:26 +00:00
Clear all gallery state on teardown
Change-Id: I90662d02bd2d9768bdcf27e532ed8b8792f764c3
This commit is contained in:
parent
12f681a19d
commit
915e818356
|
@ -408,11 +408,16 @@ ve.ui.MWGalleryDialog.prototype.getReadyProcess = function ( data ) {
|
|||
ve.ui.MWGalleryDialog.prototype.getTeardownProcess = function ( data ) {
|
||||
return ve.ui.MWGalleryDialog.super.prototype.getTeardownProcess.call( this, data )
|
||||
.first( function () {
|
||||
// Widgets
|
||||
this.galleryGroup.clearItems();
|
||||
this.highlightedItem = null;
|
||||
this.searchWidget.getQuery().setValue( '' );
|
||||
this.searchWidget.teardown();
|
||||
|
||||
// States
|
||||
this.highlightedItem = null;
|
||||
this.searchPanelVisible = false;
|
||||
this.selectedFilenames = {};
|
||||
this.initialImageData = [];
|
||||
|
||||
// Disconnect events
|
||||
this.indexLayout.disconnect( this );
|
||||
|
|
Loading…
Reference in a new issue