mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Fix for GraphQL - now autocomplete does not reset anymore (#3468)
This commit is contained in:
parent
70d5797d94
commit
bae8195dfd
@ -928,7 +928,7 @@ class CodeEditor extends Component<Props, State> {
|
||||
|
||||
_codemirrorEndCompletion() {
|
||||
if (this._autocompleteDebounce !== null) {
|
||||
clearInterval(this._autocompleteDebounce);
|
||||
clearTimeout(this._autocompleteDebounce);
|
||||
}
|
||||
}
|
||||
|
||||
@ -944,6 +944,13 @@ class CodeEditor extends Component<Props, State> {
|
||||
if (this._autocompleteDebounce !== null) {
|
||||
clearTimeout(this._autocompleteDebounce);
|
||||
}
|
||||
|
||||
// You don't want to re-trigger the hint dropdown if it's already open
|
||||
// for other reasons, like forcing its display with Ctrl+Space
|
||||
if (this.codeMirror?.isHintDropdownActive()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._autocompleteDebounce = setTimeout(() => {
|
||||
doc.execCommand('autocomplete');
|
||||
}, 700);
|
||||
|
Loading…
Reference in New Issue
Block a user