()
| 362 | } |
| 363 | |
| 364 | onInput() { |
| 365 | this.seenTabToOpenCompletionList = false; |
| 366 | this.cancelCompletions(); |
| 367 | |
| 368 | // For custom search engines, we suppress the leading prefix (e.g. the "w" of "w query terms") |
| 369 | // within the vomnibar input. |
| 370 | if (!this.isUserSearchEngineActive() && this.getUserSearchEngineForQuery() != null) { |
| 371 | this.activeUserSearchEngine = this.getUserSearchEngineForQuery(); |
| 372 | const queryTerms = this.input.value.trim().split(/\s+/); |
| 373 | this.input.value = queryTerms.slice(1).join(" "); |
| 374 | } |
| 375 | |
| 376 | // If the user types, then don't reset any previous text, and reset the selection. |
| 377 | if (this.previousInputValue != null) { |
| 378 | this.previousInputValue = null; |
| 379 | this.selection = -1; |
| 380 | } |
| 381 | this.update(); |
| 382 | } |
| 383 | |
| 384 | // Returns the UserSearchEngine for the given query. Returns null if the query does not begin with |
| 385 | // a keyword from one of the user's search engines. |
no test coverage detected