bokand.github.io icon indicating copy to clipboard operation
bokand.github.io copied to clipboard

Should scrollIntoView() scroll an element into the visual viewport?

Open theres-waldo opened this issue 6 years ago • 2 comments

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?

theres-waldo avatar Dec 22 '18 03:12 theres-waldo

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.

bokand avatar Dec 27 '18 21:12 bokand

Thanks for clarifying! The answer wasn't obvious to me, but I agree that this seems like the more user-friendly choice.

theres-waldo avatar Dec 28 '18 20:12 theres-waldo