From f677a588b2820436a626162e9e71291ce674538c Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Sat, 10 Jul 2021 15:48:04 +0800 Subject: [PATCH] Add anchor id to fragment part (#328) --- source/js/utils.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/js/utils.js b/source/js/utils.js index 15af8a3..53e8ec5 100644 --- a/source/js/utils.js +++ b/source/js/utils.js @@ -275,7 +275,10 @@ NexT.utils = { targets : document.scrollingElement, duration : 500, easing : 'linear', - scrollTop: offset + 10 + scrollTop: offset + 10, + complete : () => { + history.pushState(null, document.title, element.href); + } }); }); return target;