From 3f21a91c2bcde9b4c03df5fcdaaab4b32b428276 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Mon, 24 Mar 2014 10:40:02 -0700 Subject: [PATCH] Blank the reference and media search queries when closing dialogs Bug: 61959 Change-Id: I45e161d322d4fb0a63d35c1a75a2a39ba9f73def --- modules/ve-mw/ui/dialogs/ve.ui.MWMediaInsertDialog.js | 2 ++ modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js | 1 + 2 files changed, 3 insertions(+) diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaInsertDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaInsertDialog.js index 51a2285389..b7054c101d 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaInsertDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaInsertDialog.js @@ -195,6 +195,8 @@ ve.ui.MWMediaInsertDialog.prototype.teardown = function ( data ) { ] ).collapseRangeToEnd().select(); } + this.search.clear(); + // Parent method ve.ui.MWDialog.prototype.teardown.call( this, data ); }; diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js index 95c4d718c4..4fa811a3bf 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js @@ -407,6 +407,7 @@ ve.ui.MWReferenceDialog.prototype.teardown = function ( data ) { } } + this.search.clear(); this.referenceSurface.destroy(); this.referenceSurface = null; this.ref = null;