mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 21:21:50 +08:00
Prevent negative scroll for sidebar (#1819)
This commit is contained in:
parent
b94cab6e37
commit
d553fee2b3
1 changed files with 1 additions and 0 deletions
|
@ -268,6 +268,7 @@
|
||||||
var offset;
|
var offset;
|
||||||
if ($('#slide-panel .active').length) {
|
if ($('#slide-panel .active').length) {
|
||||||
offset = $('#slide-panel .active').offset().top - 50;
|
offset = $('#slide-panel .active').offset().top - 50;
|
||||||
|
if (offset < 0) offset = 0;
|
||||||
$('#slide-panel .tree').scrollTo(offset, 10);
|
$('#slide-panel .tree').scrollTo(offset, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue