commit | f9bf91d74bdd2313b1294761203adb01932ea5fc | [log] [tgz] |
---|---|---|
author | Changhao Han <[email protected]> | Thu Jun 25 22:24:07 2020 |
committer | Commit Bot <[email protected]> | Fri Jun 26 09:53:05 2020 |
tree | 306434d32c28c16f4d69fe6aee840b8eda94a380 | |
parent | c8a1268df576cfcb92e068ec059d83e2a2f6f663 [diff] [blame] |
Add search cancel button to SearchableView This is a follow-up work to: https://crrev.com/c/2264131 that adds clear text buttons to SearchableViews. These include many search bars with prev/next functionalities, typically invoked by "ctrl/cmd+F" keyboard shortcuts, e.g. in the Elements tree, Console log view, Network tab's Response side panes, etc. screenshot: https://imgur.com/a/Qr4gz4c Bug: chromium:1067184 Change-Id: Ic93a15dd87a70ab2196344a95402bed20ea088fe Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2268717 Auto-Submit: Changhao Han <[email protected]> Commit-Queue: Mathias Bynens <[email protected]> Reviewed-by: Alex Rudenko <[email protected]> Reviewed-by: Mathias Bynens <[email protected]>
diff --git a/front_end/ui/SearchableView.js b/front_end/ui/SearchableView.js index 9cef8d5..8997348 100644 --- a/front_end/ui/SearchableView.js +++ b/front_end/ui/SearchableView.js
@@ -71,7 +71,8 @@ const searchControlElement = searchInputElements.createChild('div', 'toolbar-search-control'); this._searchInputElement = HistoryInput.create(); - this._searchInputElement.classList.add('search-replace'); + this._searchInputElement.type = 'search'; + this._searchInputElement.classList.add('search-replace', 'custom-search-input'); this._searchInputElement.id = 'search-input-field'; this._searchInputElement.placeholder = Common.UIString.UIString('Find'); searchControlElement.appendChild(this._searchInputElement);