Browse Source

Merge pull request #11954 from grafana/11830-firefox-legend

legend: fixes Firefox/baron scroll bug
Daniel Lee 7 years ago
parent
commit
b086981e15
1 changed files with 4 additions and 0 deletions
  1. 4 0
      public/app/plugins/panel/graph/legend.ts

+ 4 - 0
public/app/plugins/panel/graph/legend.ts

@@ -287,6 +287,10 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
           destroyScrollbar();
           destroyScrollbar();
           legendScrollbar = baron(scrollbarParams);
           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();
         legendScrollbar.scroll();
       }
       }