This problems occurs in all browsers I have tested (IE11, chrome, firefox, safari) all latest version.
At dartpad we have this issue that the popup will flicker when the content is updating.

This is probably because the content is coming from a server, and it takes around 200-300 ms for that request to complete.
Now in this situation it is a bit unfortunate that codemirror is removing the popup from the dom in the showWidget.activity function:
function activity() {
clearDebounce();
var pos = completion.cm.getCursor(),
line = completion.cm.getLine(pos.line);
if (pos.line != startPos.line || line.length - pos.ch != startLen - startPos.ch ||
pos.ch < startPos.ch || completion.cm.somethingSelected() ||
(pos.ch && closeOn.test(line.charAt(pos.ch - 1)))) {
completion.close();
} else {
debounce = requestAnimationFrame(update);
if (completion.widget) completion.widget.close(); //completion popup removed here
}
}
In a situation where it takes a long time for the update function to complete, this seems to cause flickering. To solve this, I think it would be best to only remove the popup from the dom just before it is updated again. So while analyzing it a bit more, it seems that in the finishUpdate function, does exactly that:
function finishUpdate(data_) {
data = data_;
if (finished) return;
if (!data || !data.list.length) return done();
if (completion.widget) completion.widget.close(); //completion widget also closed here
completion.widget = new Widget(completion, data);
}
So either the line commented here, or the line commented seems to be redundant. To solve the flickering alltogether, I think it would be better to close the the widget in the finishUpdate function and remove the line in the showWidget.activity function. If I do this, the flickering disappears:

This problems occurs in all browsers I have tested (IE11, chrome, firefox, safari) all latest version.
At dartpad we have this issue that the popup will flicker when the content is updating.

This is probably because the content is coming from a server, and it takes around 200-300 ms for that request to complete.
Now in this situation it is a bit unfortunate that codemirror is removing the popup from the dom in the showWidget.activity function:
In a situation where it takes a long time for the update function to complete, this seems to cause flickering. To solve this, I think it would be best to only remove the popup from the dom just before it is updated again. So while analyzing it a bit more, it seems that in the finishUpdate function, does exactly that:
So either the line commented here, or the line commented seems to be redundant. To solve the flickering alltogether, I think it would be better to close the the widget in the finishUpdate function and remove the line in the showWidget.activity function. If I do this, the flickering disappears:
