Skip to content

Commit 53681fb

Browse files
committed
docs(canvas): correct useAutoFocusOnClick scope to clicks only
The TSDoc claimed the preference also gated arrow-key navigation, which calls focusBlockInView without consulting it. State the click-only scope and why arrow-key navigation and block creation are excluded.
1 parent 177dfad commit 53681fb

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

apps/sim/hooks/queries/general-settings.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,12 @@ export function useShowActionBar(): boolean {
126126
}
127127

128128
/**
129-
* Whether the canvas camera animates to center a block when it is clicked or
130-
* reached with arrow-key navigation.
129+
* Whether the canvas camera animates to center a block when it is clicked.
130+
*
131+
* Scoped to clicks only. Arrow-key navigation and block creation deliberately
132+
* keep following the camera regardless — both move selection to a block that
133+
* may be off-screen, so suppressing the move would leave the user with no way
134+
* to tell where the selection went.
131135
*/
132136
export function useAutoFocusOnClick(): boolean {
133137
const { data } = useGeneralSettings()

0 commit comments

Comments
 (0)