Delay popup with spell checker initialization to fix missing checkmark

This commit is contained in:
Martynas Bagdonas 2021-06-23 12:28:21 +03:00 committed by Dan Stillman
parent 9a7016ad64
commit e3758dc581

View file

@ -661,7 +661,9 @@ class EditorInstance {
}
case 'openContextMenu': {
let { x, y, pos, itemGroups } = message;
this._openPopup(x, y, pos, itemGroups);
// If `contenteditable` area wasn't focused before, the spell checker
// might not be fully initialized on right-click
setTimeout(() => this._openPopup(x, y, pos, itemGroups), 50);
return;
}
case 'return': {