From 3735a1ace7bd24b527571d927c889567bfce0649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patric=20Kanngie=C3=9Fer?= Date: Tue, 7 Mar 2017 08:19:34 +0100 Subject: [PATCH] remember scroll position (https://github.com/grafana/grafana/issues/7680) (#7728) --- public/app/plugins/panel/graph/legend.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/app/plugins/panel/graph/legend.js b/public/app/plugins/panel/graph/legend.js index fd5abfb2db2..2cdb1821793 100644 --- a/public/app/plugins/panel/graph/legend.js +++ b/public/app/plugins/panel/graph/legend.js @@ -65,7 +65,9 @@ function (angular, _, $) { var el = $(e.currentTarget); var index = getSeriesIndexForElement(el); var seriesInfo = seriesList[index]; + var scrollPosition = $($container.children('tbody')).scrollTop(); ctrl.toggleSeries(seriesInfo, e); + $($container.children('tbody')).scrollTop(scrollPosition); } function sortLegend(e) {