ziad-saab / hw-parallax

Hardware-accelerated parallax scrolling plugin for jQuery
MIT License
39 stars 13 forks source link

Fix background flicker on resize (in Firefox) #6

Closed jordif closed 9 years ago

jordif commented 9 years ago

Hi Ziad,

first, thanks a lot for sharing this plugin! Very nice job.

I've been using it for some time now. The only issue I've encounterd is that, in Firefox, background images flicker while you're resizing the browser.

This seems to happen because visibility is set to hidden in the redrawBlocks method and immediately after it is set to visible by the draw method.

It seems safe to remove the first change of visibility, since the draw method has an if-else statement that will set the visibility to hidden or visible, and the draw method is always called after the redrawBlocks method.

Thanks again,

Jordi

ziad-saab commented 9 years ago

@jordif you are right! Since render is always called immediately after redrawBlocks I don't need to have that in there.