From bba0a07d3228607213cfa40aa48bfcaa798fcdd4 Mon Sep 17 00:00:00 2001 From: Kwanghyun On Date: Tue, 29 Oct 2024 13:27:21 +0900 Subject: [PATCH] Update comment --- .../chat-view/chat-input/plugins/auto-focus/AutoFocusPlugin.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/chat-view/chat-input/plugins/auto-focus/AutoFocusPlugin.tsx b/src/components/chat-view/chat-input/plugins/auto-focus/AutoFocusPlugin.tsx index 2bea3c4..714a990 100644 --- a/src/components/chat-view/chat-input/plugins/auto-focus/AutoFocusPlugin.tsx +++ b/src/components/chat-view/chat-input/plugins/auto-focus/AutoFocusPlugin.tsx @@ -15,7 +15,7 @@ export default function AutoFocusPlugin({ () => { const rootElement = editor.getRootElement() if (rootElement) { - // requestAnimationFrame ensures DOM is rendered + // requestAnimationFrame is required here for unknown reasons, possibly related to the Obsidian plugin environment. requestAnimationFrame(() => { rootElement.focus() })