inuyaksa / jquery.nicescroll

nicescroll plugin for jquery - scrollbars like iphone/ipad
https://nicescroll.areaaperta.com/
3.6k stars 1.67k forks source link

Using this plugin I got a flickering scroll bar #674

Closed wfso closed 7 years ago

wfso commented 7 years ago

I use the plugin on a page, at the same time there are many other HTML element on the page. When I use the mouse to click an input box or other elements in the page changes occurred in the CSS styles, scroll bars will flickering. Flashing way is repeatedly hide and display .

wfso commented 7 years ago

I look at the program's source code, may be associated with setTimeout in the following code, after I remove the setTimeout function It doesn't flicker .

this.lazyResize = function (tm) { // event debounce

  if (!self.haswrapper) self.hide();
  if (self.hlazyresize) clearTimeout(self.hlazyresize);
  self.hlazyresize = setTimeout(function () {
    if (self) { self.resize(); self.show(); }  // this form mandatory for uglify
  }, 240);

  return self;

};

The modified code is as follows:

this.lazyResize = function (tm) { // event debounce

  if (!self.haswrapper) self.hide();
  if (self.hlazyresize) clearTimeout(self.hlazyresize);

  if (self) { self.resize(); self.show(); }  // this form mandatory for uglify

  return self;

};
inuyaksa commented 7 years ago

Please test RC5

inuyaksa commented 7 years ago

Please test lastest release (3.7.4)

suyogbbhuvad commented 4 years ago

The Page is flickering instead of scrollbar. What to do? Version used is / jquery.nicescroll v 3.7.5-d [DEV] - InuYaksa2017 - MIT - https://nicescroll.areaaperta.com/ */