From e3758dc58182e22fa9b24fd7d902e1246b904772 Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Wed, 23 Jun 2021 12:28:21 +0300 Subject: [PATCH] Delay popup with spell checker initialization to fix missing checkmark --- chrome/content/zotero/xpcom/editorInstance.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/editorInstance.js b/chrome/content/zotero/xpcom/editorInstance.js index 7c7483e85e..9b4b4a5826 100644 --- a/chrome/content/zotero/xpcom/editorInstance.js +++ b/chrome/content/zotero/xpcom/editorInstance.js @@ -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': {