Revert "[cm6] close autocomplete menu on blur"

This reverts commit d47648044ca15cf29cc0c87479ba2a204f232a86.

GitOrigin-RevId: dc6bbcc30126d46a3b602896bfc18477fd07ab34
This commit is contained in:
Dom Kriskovic 2023-05-09 14:08:11 +02:00 committed by Copybot
parent 4c2537a753
commit eafa8589c5

View file

@ -10,7 +10,6 @@ import { misspelledWordsField } from './misspelled-words'
import { addIgnoredWord } from './ignored-words'
import { learnWordRequest } from './backend'
import { Word } from './spellchecker'
import { closeCompletion } from '@codemirror/autocomplete'
const ITEMS_TO_SHOW = 8
@ -119,17 +118,6 @@ export const spellingMenuField = StateField.define<Tooltip | null>({
EditorView.domEventHandlers({
contextmenu: handleContextMenuEvent,
click: handleClickEvent,
blur: (event, view: EditorView) => {
if (
event.relatedTarget instanceof HTMLButtonElement &&
event.relatedTarget.classList.contains('advanced-ref-search')
) {
// prevent closing autocomplete menu if "advanced references search" Open button is clicked
return
}
closeCompletion(view)
},
}),
]
},