From 77d7d29d6c109800a5afb779bfbebed24c06d513 Mon Sep 17 00:00:00 2001 From: Brandon Goddard Date: Wed, 14 Oct 2020 14:01:12 -0700 Subject: [PATCH] Force FilterBar to update auto-complete suggestions after a completion In the filters for the network and console, there are an initial set of possible autocompletions for different filter types such as "method, mime-type, domain, etc". After using tab to autocomplete one of these suggestions, a different set of autocompletion options should appear, i.e. "method:GET, method:POST, etc" However, the TextPrompt object does not currently update the completion list after accepting an initial completion. This PR causes the TextPrompt to fetch autocompletion suggestions after accepting an initial autocomplete to account for these cases. Before: https://imgur.com/QiLXkKD After: https://imgur.com/taEUUw3 Bug: 1138624 Change-Id: Ib5aca39967672b22de97285dd8c5df238a6eafa4 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2472845 Reviewed-by: Robert Paveza Commit-Queue: Brandon Goddard --- front_end/ui/TextPrompt.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/front_end/ui/TextPrompt.js b/front_end/ui/TextPrompt.js index aa5f1ce461..f9981805bf 100644 --- a/front_end/ui/TextPrompt.js +++ b/front_end/ui/TextPrompt.js @@ -446,7 +446,9 @@ export class TextPrompt extends Common.ObjectWrapper.ObjectWrapper { if (!result) { result = this._acceptSuggestionInternal(); } - + if (result) { + this.autoCompleteSoon(); + } return result; }