Commit 24422bca authored by Erik Luo's avatar Erik Luo Committed by Commit Bot

DevTools: refreshing Elements search should not show '0 out of 0'

The Elements search bar shows the number of matches when active.
Upon a refresh/navigation, it cancels the search, but leaves
'0 out of 0' in the search box, even if there are matches.

This CL stops showing incorrect information and hides the match
count completely in those cases.

Screenshot: https://imgur.com/a/xdyD4

Bug: 554654
Change-Id: I49791d302ade2719ae0b609cab8d325a562bb87a
Reviewed-on: https://chromium-review.googlesource.com/920041Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537847}
parent e56aee64
......@@ -316,10 +316,6 @@ Elements.ElementsPanel = class extends UI.Panel {
}
}
_reset() {
delete this.currentQuery;
}
/**
* @param {!Common.Event} event
*/
......@@ -332,8 +328,7 @@ Elements.ElementsPanel = class extends UI.Panel {
* @param {!SDK.DOMModel} domModel
*/
_documentUpdated(domModel) {
this._reset();
this.searchCanceled();
this._searchableView.resetSearch();
if (!domModel.existingDocument()) {
if (this.isShowing())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment