diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 44f04e4d5bd..eec069d5d7d 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -14,6 +14,12 @@ Ensures the given [code]control[/code] is visible (must be a direct or indirect child of the ScrollContainer). Used by [member follow_focus]. + [b]Note:[/b] This will not work on a node that was just added during the same frame. If you want to scroll to a newly added child, you must wait until the next frame using [signal SceneTree.idle_frame]: + [codeblock] + add_child(child_node) + yield(get_tree(), "idle_frame") + ensure_control_visible(child_node) + [/codeblock]