| Index: third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js b/third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js
|
| index 34afd71e2d4b703e25d04a2845b15d9bad147a0a..1bdfe003dd463ade82fd8f5562b04c6f7b4978c1 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js
|
| @@ -97,15 +97,17 @@ UI.FilterBar = class extends UI.HBox {
|
| _updateFilterBar() {
|
| var visible = this._alwaysShowFilters || (this._filtersShown && this._enabled);
|
| this.element.classList.toggle('hidden', !visible);
|
| - if (visible) {
|
| - for (var i = 0; i < this._filters.length; ++i) {
|
| - if (this._filters[i] instanceof UI.TextFilterUI) {
|
| - var textFilterUI = /** @type {!UI.TextFilterUI} */ (this._filters[i]);
|
| - textFilterUI.focus();
|
| - }
|
| + this.invalidateSize();
|
| + }
|
| +
|
| + _focusTextField() {
|
| + for (var i = 0; i < this._filters.length; ++i) {
|
| + if (this._filters[i] instanceof UI.TextFilterUI) {
|
| + var textFilterUI = /** @type {!UI.TextFilterUI} */ (this._filters[i]);
|
| + textFilterUI.focus();
|
| + break;
|
| }
|
| }
|
| - this.invalidateSize();
|
| }
|
|
|
| _updateFilterButton() {
|
| @@ -141,6 +143,8 @@ UI.FilterBar = class extends UI.HBox {
|
|
|
| this._updateFilterButton();
|
| this._updateFilterBar();
|
| + if (this._filtersShown)
|
| + this._focusTextField();
|
| this.dispatchEventToListeners(UI.FilterBar.Events.Toggled);
|
| }
|
|
|
|
|