Scrolling blocks javascript execution in Firefox

为君一笑 提交于 2020-01-06 13:00:17

问题


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.

来源:https://stackoverflow.com/questions/8509613/scrolling-blocks-javascript-execution-in-firefox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!