scrollIntoView is a W3C JavaScript method that scrolls an element into view. Learn which browsers support it, the options it accepts, and the known issues.

Prince Dewani
May 2, 2026
scrollIntoView is a JavaScript method on the Element interface, defined by the W3C CSSOM View Module, that scrolls an element into the visible viewport. It works in Chrome 61+, Edge 79+, Firefox 36+, Safari 16+ on macOS and iOS, Opera 48+, and Samsung Internet 8.2+, while Internet Explorer never added full support.
This guide covers what scrollIntoView is, the browsers that support it, the options object, how to use it in JavaScript, and the known issues that cause failures.
scrollIntoView is an Element method standardized in the W3C CSSOM View Module. Calling element.scrollIntoView() asks the browser to scroll every scrollable ancestor until the target appears in the viewport, with optional control over alignment and animation through an options object.
scrollIntoView works in every major modern browser, including Chrome, Edge, Firefox, Safari, Opera, and Samsung Internet. Internet Explorer shipped only the Boolean form and never added the smooth behavior or the options dictionary.
Chrome supports scrollIntoView from Chrome 61 on desktop and Android, with the smooth behavior shipping at the same release. Chrome 4 to 60 had partial support that handled the Boolean argument but not the options dictionary, and the smooth animation only became reliable after Chrome 61.
Edge supports scrollIntoView from Edge 79 on desktop, the first Chromium-based release that brought the smooth behavior. Legacy Edge 12 to 18 had partial support that included the Boolean form and parts of the options dictionary, but missed the smooth animation.
Firefox supports scrollIntoView from Firefox 36 on desktop and Firefox for Android, including the options dictionary and the smooth behavior in the same release. Firefox 2 to 35 had partial support that recognized only the Boolean argument and ignored the options object.
Safari supports scrollIntoView from Safari 16 on macOS and iOS, with the options dictionary first shipping in Safari 15.4. Safari 5.1 to 15.6 had partial support that handled the Boolean form but ignored the smooth behavior, and Safari 3.1 to 5 on macOS did not support the method at all.
Opera supports scrollIntoView from Opera 48 on desktop and Opera Mobile 80 on Android, with the smooth behavior arriving at the same release. Opera 11.6 to 47 had partial support, and Opera Mini does not support scrollIntoView in any version because it strips client-side scrolling on the server.
Samsung Internet supports scrollIntoView from Samsung Internet 8.2 on Android, with the smooth behavior arriving in version 8.0. Samsung Internet 4 to 7.4 had partial support that handled the Boolean argument, and Samsung Internet 2 and 3 did not include the method.
The WebView-based Android Browser supports scrollIntoView from version 147 on, matching its underlying Chromium release. Android Browser 2.3 to 4.4.4 shipped partial support that handled the Boolean form, and Android Browser 4.0 and earlier had no smooth behavior.
Internet Explorer 8 to 11 ship only the Boolean form of scrollIntoView. The options dictionary and the smooth behavior never landed in IE, and Internet Explorer 5.5 to 7 did not support the method at all. Microsoft has retired Internet Explorer, so apps still on IE need the smoothscroll polyfill or a migration to Edge.
Note: scrollIntoView behavior shifts between Safari, Chrome, and Firefox, especially around the smooth animation and fixed-header offsets. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!
scrollIntoView accepts either a Boolean argument (legacy form) or an options object with three properties: behavior, block, and inline. The options object gives you precise control over alignment and animation, and every Chromium-based browser, Firefox 36+, and Safari 15.4+ honor it.
Get a reference to the target element, call scrollIntoView on it, and pass an options object that describes the alignment and animation you want. The browser walks every scrollable ancestor and scrolls each one until the target reaches the configured position.
// Smoothly scroll a section into the center of the viewport.
const target = document.querySelector("#section-pricing");
if (target && typeof target.scrollIntoView === "function") {
target.scrollIntoView({
behavior: "smooth", // animate the scroll instead of jumping
block: "center", // align vertically in the middle of the viewport
inline: "nearest", // leave the horizontal axis alone unless needed
});
} else {
console.warn("scrollIntoView is not supported in this browser.");
}If the page does not move, log the target first; scrollIntoView quietly returns when the target is null, detached from the DOM, or hidden with display: none.
scrollIntoView covers most cases, but a handful of edge cases catch teams off guard, especially around iOS Safari, fixed headers, and nested scroll containers.
All scrollIntoView version numbers and platform notes in this guide come from these primary sources:
Did you find this page helpful?
More Related Hubs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance