Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/ui/SearchableView.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/SearchableView.js b/third_party/WebKit/Source/devtools/front_end/ui/SearchableView.js |
| index 4922e236e813917b7b52700fdf96274d24b817ff..bd69666b492c576c58efc913db801a75b5f2e22e 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/ui/SearchableView.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/SearchableView.js |
| @@ -352,6 +352,7 @@ UI.SearchableView = class extends UI.VBox { |
| this._updateReplaceVisibility(); |
| if (queryCandidate) |
| this._searchInputElement.value = queryCandidate; |
| + this._searchProvider.searchCanceled(); |
|
Oleksii Kadurin
2017/02/07 20:20:24
Reset search by explicit invocation of .searchCanc
pfeldman
2017/02/07 23:19:36
This might come unexpected to the provider, why do
Oleksii Kadurin
2017/02/07 23:57:18
It was the part of performSearch function (in the
pfeldman
2017/02/08 01:52:41
Right, but you are changing this contract for all
Oleksii Kadurin
2017/02/08 18:49:14
I've got it now. Thanks!
|
| this._performSearch(false, false); |
| this._searchInputElement.focus(); |
| this._searchInputElement.select(); |
| @@ -379,9 +380,9 @@ UI.SearchableView = class extends UI.VBox { |
| return; |
| if (!this._currentQuery) |
| - this._performSearch(true, true, event.shiftKey); |
| + this._clearSearch(); |
| else |
| - this._jumpToNextSearchResult(event.shiftKey); |
| + this._performSearch(false, true, event.shiftKey); |
| } |
| /** |
| @@ -408,14 +409,14 @@ UI.SearchableView = class extends UI.VBox { |
| _onNextButtonSearch(event) { |
| if (!this._searchNavigationNextElement.classList.contains('enabled')) |
| return; |
| - this._jumpToNextSearchResult(); |
| + this._performSearch(false, true); |
| this._searchInputElement.focus(); |
| } |
| _onPrevButtonSearch(event) { |
| if (!this._searchNavigationPrevElement.classList.contains('enabled')) |
| return; |
| - this._jumpToNextSearchResult(true); |
| + this._performSearch(false, true, true); |
| this._searchInputElement.focus(); |
| } |
| @@ -516,6 +517,7 @@ UI.SearchableView = class extends UI.VBox { |
| if (!this._searchIsVisible) |
| return; |
| delete this._valueChangedTimeoutId; |
| + this._searchProvider.searchCanceled(); |
|
Oleksii Kadurin
2017/02/07 20:20:24
Reset search by explicit invocation of .searchCanc
pfeldman
2017/02/07 23:19:36
That seems fine.
|
| this._performSearch(false, true); |
| } |
| }; |