From: Stas Vilchik Date: Tue, 1 Jul 2014 05:55:25 +0000 (+0600) Subject: Fix horizontal scrolling with the sidebar X-Git-Tag: 4.4-RC1~80 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=aa299e4d866c1465bffa2d4a6680ad1b0309a4f5;p=sonarqube.git Fix horizontal scrolling with the sidebar --- diff --git a/sonar-server/src/main/js/dashboard.js b/sonar-server/src/main/js/dashboard.js index b774863bf51..e35d47f90b7 100644 --- a/sonar-server/src/main/js/dashboard.js +++ b/sonar-server/src/main/js/dashboard.js @@ -139,8 +139,10 @@ var $window = jQuery(window), topOffset = $sidebar.offset().top; $window.on('scroll', function () { - var scrollTop = $window.scrollTop(); + var scrollTop = $window.scrollTop(), + scrollLeft = $window.scrollLeft(); $sidebar.toggleClass('sticky', scrollTop > topOffset); + $sidebar.css('left', -scrollLeft + 10); }); } });