mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-24 16:29:51 +01:00
fix: #13919
This commit is contained in:
@@ -25,10 +25,13 @@ define('admin/settings', [
|
||||
});
|
||||
const offset = mainHader.outerHeight(true);
|
||||
// https://stackoverflow.com/a/11814275/583363
|
||||
tocList.find('a').on('click', function (event) {
|
||||
event.preventDefault();
|
||||
tocList.find('a').on('click', function () {
|
||||
const href = $(this).attr('href');
|
||||
$(href)[0].scrollIntoView();
|
||||
const $target = $(href);
|
||||
if (!$target.length) {
|
||||
return;
|
||||
}
|
||||
$target.get(0).scrollIntoView(true);
|
||||
window.location.hash = href;
|
||||
scrollBy(0, -offset);
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user