From 37cf7d11b94edf5d6f239cd287b5aae000ede934 Mon Sep 17 00:00:00 2001 From: GeoSot Date: Wed, 8 Jun 2022 22:35:09 +0300 Subject: Scrollspy: enable smooth-scroll behavior (#36528) --- js/src/scrollspy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/src') diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index 323194c53..33447c2bd 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -128,7 +128,7 @@ class ScrollSpy extends BaseComponent { const root = this._rootElement || window const height = observableSection.offsetTop - this._element.offsetTop if (root.scrollTo) { - root.scrollTo({ top: height }) + root.scrollTo({ top: height, behavior: 'smooth' }) return } -- cgit v1.2.3