Always Show Browser Scrollbar To Prevent Flicker With Angular Js

Posted By Weston Ganger

I was having issues with flicker after I moved my navbar and sidebar into ng-includes

This problem arises because the page data is loaded shortly after the page shows and causes a flicker when the DOM is updated and the page needs a scrollbar.

The fix is to turn on the scrollbar permanently via CSS:


body{
  overflow-y:scroll;
}

Even works in IE6 so browser support is good.

Article Topic:Software Development - Angular

Date:August 20, 2014