Skip to content

layout breaks when scrolling element into view #613

@gabrielbergoc

Description

@gabrielbergoc

Hey, first of all, awesome lib!

We're using it in an Angular app, and it works perfectly, until the element that must be highlighted in the current step is at the bottom-right corner of a scrollable container. Then, the element is scrolled into view, but the page layout breaks:

Image

I investigated the lib's source code, and I could isolate the issue:

Image

When I call element.scrollIntoView() (in dev tools) without any options, the scroll is fine, but when I use the option inline: "center", then it behaves like I described above.

I don't know if this option should be removed, or if it's essential to use it, and I couldn't make a minimal reproducible example, and don't know how to fix it (there's no way of passing a different option, or a hook to scroll the page back into view after this call).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions