()
| 369 | } |
| 370 | |
| 371 | clearCompletionInitHook(): (editor: CodeMirror.Editor) => void { |
| 372 | return (editor: CodeMirror.Editor) => { |
| 373 | const el = editor.getInputField().closest('.CodeMirror'); |
| 374 | if (el === null) { |
| 375 | return; |
| 376 | } |
| 377 | const div = el as HTMLDivElement; |
| 378 | div.addEventListener('focusout', () => { |
| 379 | this.clearCompletion('focusout'); |
| 380 | }); |
| 381 | div.addEventListener('mousedown', () => { |
| 382 | this.clearCompletion('mousedown'); |
| 383 | }); |
| 384 | }; |
| 385 | } |
| 386 | } |
| 387 | |
| 388 | export function addListeners( |
no test coverage detected