Scrolling blocks javascript execution in Firefox

2019-08-20 04:34发布

问题:

I've come down to this interesting (and annoying) Firefox feature while implementing parallax scrolling on one of the supported sites. Strangely, Firefox (version 8.0) performed worst of all browsers, with even IE8 being ahead.

After some investigation, I've figured out that FF plainly stops Javascript execution until the scrolling has stopped.

The example can be seen here: http://jsfiddle.net/svd53/. Just try to pan the scrollbar slowly in one direction and pay attention to the counter.

Any ideas?

UPD: It lags the most when scrolling in one direction. The complexity of content also adds the lag.