]> source.dussan.org Git - sonarqube.git/commitdiff
Fix horizontal scrolling with the sidebar
authorStas Vilchik <vilchiks@gmail.com>
Tue, 1 Jul 2014 05:55:25 +0000 (11:55 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Tue, 1 Jul 2014 05:55:25 +0000 (11:55 +0600)
sonar-server/src/main/js/dashboard.js

index b774863bf51b2848882615bdee42ed7dce858202..e35d47f90b7ef914a13134a000939493466c9319 100644 (file)
       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);
       });
     }
   });