Destroy pop-up open autocomplete in Ace editor

I use Ace Editor with autocompletion enabled . The editor appears in a modal frame on the page.

If the modal frame is closed (i.e. the editor is removed from the DOM) when the pop-up autofill window is open, the pop-up window is stuck and cannot be closed. What is the right way to destroy a popup?

The best I've found so far

editor.completer.detach();

This seems to work, but it is undocumented, and I don't know if there are any side effects or problems. Is there a better option?

+4
source share

All Articles