sticky icon indicating copy to clipboard operation
sticky copied to clipboard

Sticky element is flickering when scrollup - when sticking

Open sunich opened this issue 11 years ago • 8 comments

For example in the demo site "http://stickyjs.com/", scroll using mouse wheel, when element is about to stick to top, it is disappearing for a moment and then displayed - this is causing a flicker effect, is there any solution for this sticking to happen in a smooth transition. But when, window is scrolled using mouse pointer, the transition is very smooth(this effect is required when scrolled using mouse wheel).

sunich avatar Nov 25 '13 17:11 sunich

Can you reproduce this effect on multiple browsers?

garand avatar Nov 25 '13 20:11 garand

Hi, I have checked now, Flicker is happening predominantly in chrome browser. And less noticeable in Internet explorer but there is no issue and very smooth in firefox.

sunich avatar Nov 25 '13 21:11 sunich

i have that same flickering problem in chrome.

darisi avatar Nov 27 '13 15:11 darisi

Still an issue for me in the current version of chrome.

johannesjo avatar Jun 20 '14 09:06 johannesjo

Same issue on Android.

thejae avatar Dec 08 '14 10:12 thejae

Looks line in Windows the mouse event on the scroll button does not trigger an actual scroll event until the mousewheel has finished scrolling. You'll need to bind scroller to the mousewheel, example:

$window.bind("mousewheel DOMMouseScroll MozMousePixelScroll", function() {
    scroller();
});

If there is a more efficient method, someone please let me know! Because when doing this since it's already bound to the scroll event it will run the scroller function 2x...hum...any ideas?

wpexplorer avatar Sep 23 '15 00:09 wpexplorer

@wpexplorer thanks for this, it worked!

aaronkantrowitz avatar Jan 21 '18 20:01 aaronkantrowitz

@aaronkantrowitz - No problem! But make sure to test, I actually removed it from my project because I was having some bugs in Safari.

wpexplorer avatar Jan 22 '18 03:01 wpexplorer