diff --git a/src/components/middle/composer/hooks/useInputCustomEmojis.ts b/src/components/middle/composer/hooks/useInputCustomEmojis.ts index a101951a2..5b6472b6f 100644 --- a/src/components/middle/composer/hooks/useInputCustomEmojis.ts +++ b/src/components/middle/composer/hooks/useInputCustomEmojis.ts @@ -121,7 +121,10 @@ export default function useInputCustomEmojis( return; } - synchronizeElements(); + // Wait one frame for DOM to update + fastRaf(() => { + synchronizeElements(); + }); }, [getHtml, synchronizeElements, inputRef, removeContainers, sharedCanvasRef, isActive]); const throttledSynchronizeElements = useThrottledCallback(