mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Fix bug in which Console was attempting to detach the suggestions completer even when it wasn't rendered. (#138030) (#138155)
(cherry picked from commit dc20c94094
)
Co-authored-by: CJ Cenizal <cj.cenizal@elastic.co>
This commit is contained in:
parent
200a1b7ad0
commit
f05707ef90
1 changed files with 4 additions and 1 deletions
|
@ -229,7 +229,10 @@ export class LegacyCoreEditor implements CoreEditor {
|
|||
}
|
||||
|
||||
detachCompleter() {
|
||||
return (this.editor as unknown as { completer: { detach(): void } }).completer.detach();
|
||||
// In some situations we need to detach the autocomplete suggestions element manually,
|
||||
// such as when navigating away from Console when the suggestions list is open.
|
||||
const completer = (this.editor as unknown as { completer: { detach(): void } }).completer;
|
||||
return completer?.detach();
|
||||
}
|
||||
|
||||
private forceRetokenize() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue