From 18379c30bf1e0d219555bcddc4a89d1bb61458e8 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Wed, 16 May 2018 00:18:28 +0200 Subject: [PATCH 1/3] scroll: temporary fix for double scrollbar issue If #11939 is not merged in the patch release, then this is a temporary fix for 5.1.3. It sets overflow to hidden for larger screens and keeps the overflow set to auto for mobiles and tablets. Fixes #11937 (cherry picked from commit 567fec402e2fb2147e96c3d54174c3d2563c424b) --- public/sass/pages/_dashboard.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/sass/pages/_dashboard.scss b/public/sass/pages/_dashboard.scss index 471e90ed9cf..fb947f176dd 100644 --- a/public/sass/pages/_dashboard.scss +++ b/public/sass/pages/_dashboard.scss @@ -44,10 +44,18 @@ div.flot-text { padding: $panel-padding; height: calc(100% - 27px); position: relative; + // Fixes scrolling on mobile devices overflow: auto; } +// For larger screens, set back to hidden to avoid double scroll bars +@include media-breakpoint-up(md) { + .panel-content { + overflow: hidden; + } +} + .panel-title-container { min-height: 9px; cursor: move; From 871db9d5d4effeb137748ec25c1070ab69319144 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Wed, 16 May 2018 15:07:34 +0200 Subject: [PATCH 2/3] legend: fixes Firefox/baron scroll bug Compensates for Firefox scrollbar calculation error in the baron framework. Offsetwidth and clientwidth are used to find the width of the scrollbar. In the legend these differ by 9px and cause the scroll div to grow by 9px for every refresh. This fix compensates with a negative margin-right in that case. Fixes #11830 (cherry picked from commit 50026fad2ec28b850b6e1351f03aa7a792e2eb4d) --- public/app/plugins/panel/graph/legend.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/app/plugins/panel/graph/legend.ts b/public/app/plugins/panel/graph/legend.ts index 6b6c89444dc..af61db396ba 100644 --- a/public/app/plugins/panel/graph/legend.ts +++ b/public/app/plugins/panel/graph/legend.ts @@ -287,6 +287,10 @@ module.directive('graphLegend', function(popoverSrv, $timeout) { destroyScrollbar(); legendScrollbar = baron(scrollbarParams); } + + // #11830 - compensates for Firefox scrollbar calculation error in the baron framework + scroller[0].style.marginRight = '-' + (scroller[0].offsetWidth - scroller[0].clientWidth) + 'px'; + legendScrollbar.scroll(); } From ab0dc3f086d000d0eabade60080d939b6234b223 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Wed, 16 May 2018 17:27:50 +0200 Subject: [PATCH 3/3] v5.1.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f085f082726..3154b7f107f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "company": "Grafana Labs" }, "name": "grafana", - "version": "5.1.2", + "version": "5.1.3", "repository": { "type": "git", "url": "http://github.com/grafana/grafana.git"