DmitryBaranovskiy/raphael — Issue #440: Assigning image patterns - scrollbar-flickering (solution)
Author: ostgals
Created: 2011-11-06 11:02:49+00:00
State: open

There is a bug that causes vertical scrollbar to flicker (as if the document height changed) when you assign image pattern to element, e.g. el.attr('url(path/image.jpg'). Mostly the problem occures in Opera and Safari (not Chrome), however it may appear in other browsers too, probably excepting VML-branch browsers.

The reason is invalid css-syntax in Raphael texture preloader, line 773 (uncomressed source of ver 2.0.0):

img.style.cssText = "position:absolute;left:-9999em;top-9999em";

There is no colon after rule 'top' as you can see. Correct version of this line must be:

img.style.cssText = "position:absolute;left:-9999em;top:-9999em";

This small correction has fixed scrollbar-flickering. At least in my case.