Skip to content

Commit e35f2b8

Browse files
fix scroll to top issue
1 parent 8bc2a47 commit e35f2b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/assets/js/linkable-tabs.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ jQuery(function () {
99
$('.wt-tabs.nav-tabs a').on('shown.bs.tab', function (e) {
1010
var scrollPos = $('body').scrollTop();
1111
window.location.hash = e.target.hash;
12-
$('html,body').scrollTop(scrollPos);
12+
if (scrollPos !== 0) {
13+
$('html,body').scrollTop(scrollPos);
14+
}
1315
});
1416

1517
// Append Tab hash to any forms that reside within a tab.

0 commit comments

Comments
 (0)