Skip to content

scroll components into view when they're focused #9212

Description

@maribethb

currently, the LineCursor manually calls workspace.scrollBoundsIntoView whenever the focused node is specifically a block, field, or workspace comments. it makes instanceof checks for these. this is clunky and not extensible.

should these components do this automatically in their "onNodeFocus" methods? is there a time when a node is focused that we wouldn't want to scroll them into view?

if there is and we can't do it in the onNodeFocus method, do we need an interface for "is-scroll-into-bounds-able" so that the linecursor can do it without making instanceof checks?

Originally posted by @maribethb in #9211 (review)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions