bokand.github.io
bokand.github.io copied to clipboard
Should scrollIntoView() scroll an element into the visual viewport?
If you load https://bokand.github.io/viewporttest.html in Chromium, zoom in such that the target element is out of view, and click the target.scrollIntoView
button, the element does not get scrolled into the visual viewport.
Should it?
Yes, I this is a bug in Chrome: crbug.com/914450.
IMO, ScrollIntoView should also scroll the visual viewport but doesn't in Chrome today.
Thanks for clarifying! The answer wasn't obvious to me, but I agree that this seems like the more user-friendly choice.