| Index: chrome/browser/resources/md_history/list_container.js | 
| diff --git a/chrome/browser/resources/md_history/list_container.js b/chrome/browser/resources/md_history/list_container.js | 
| index 448c27cae3356014d508703b4af85849af34b910..4a89f4fb0c37ce77a2497798caaf04f709b84a36 100644 | 
| --- a/chrome/browser/resources/md_history/list_container.js | 
| +++ b/chrome/browser/resources/md_history/list_container.js | 
| @@ -65,10 +65,13 @@ Polymer({ | 
| return; | 
| } | 
|  | 
| +    // Close any open dialog if a new query is initiated. | 
| +    if (!incremental) | 
| +      this.$.dialog.close(); | 
| + | 
| this.set('queryState.querying', true); | 
| this.set('queryState.incremental', incremental); | 
|  | 
| - | 
| var lastVisitTime = 0; | 
| if (incremental) { | 
| var lastVisit = this.queryResult.results.slice(-1)[0]; | 
| @@ -113,7 +116,6 @@ Polymer({ | 
| /** @private */ | 
| loadMoreHistory_: function() { this.queryHistory(true); }, | 
|  | 
| - | 
| /** | 
| * @param {HistoryQuery} info | 
| * @param {!Array<HistoryEntry>} results | 
|  |