Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chrisjsewell opened this issue Jan 24, 2024 · 0 comments

Comments

@chrisjsewell
Copy link
Member

chrisjsewell commented Jan 24, 2024

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

@chrisjsewell chrisjsewell changed the title Chrome does not seem to obey element.scrollIntoView({ behavior: "instant" }) Some browsers does not seem to obey scrollIntoView({ behavior: "instant" }) if in iframe Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant