Skip to content

Some browsers does not seem to obey scrollIntoView({ behavior: "instant" }) if in iframe #4

Description

@chrisjsewell

The code that ensures the target is visible within the iframe is:

element.scrollIntoView({ behavior: "instant" });

This appears to work correctly in Firefox, but Chrome / Safari seems to ignore it?

with Firefox (121.0 on OSX arm64), the is no scroll:

firefox-no-scroll

with Chrome (120.0.6099.216 on OSX arm64) and Safari (17.2.1) , the scolling still occurs:

chrome-scroll

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