From d553fee2b38646f1014b52b261c21cc5027295e2 Mon Sep 17 00:00:00 2001 From: aignatov-bio <47317017+aignatov-bio@users.noreply.github.com> Date: Wed, 5 Jun 2019 12:41:27 +0200 Subject: [PATCH] Prevent negative scroll for sidebar (#1819) --- app/assets/javascripts/sidebar.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/sidebar.js b/app/assets/javascripts/sidebar.js index b31678f80..9e1338f71 100644 --- a/app/assets/javascripts/sidebar.js +++ b/app/assets/javascripts/sidebar.js @@ -268,6 +268,7 @@ var offset; if ($('#slide-panel .active').length) { offset = $('#slide-panel .active').offset().top - 50; + if (offset < 0) offset = 0; $('#slide-panel .tree').scrollTo(offset, 10); } }