Skip to content

Commit ec79af4

Browse files
committed
Update Chrome background rendering fix
1 parent c0aafc3 commit ec79af4

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

stellar.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,18 @@
181181
this._findBackgrounds();
182182

183183
// Fix for Chrome background rendering bug
184-
setTimeout(function(){
185-
var oldLeft = self._getScrollLeft(),
186-
oldTop = self._getScrollTop();
184+
if (navigator.userAgent.indexOf('Chrome') > 0) {
185+
$(window).load(function(){
186+
var oldLeft = self._getScrollLeft(),
187+
oldTop = self._getScrollTop();
187188

188-
self._setScrollLeft(oldLeft + 1);
189-
self._setScrollTop(oldTop + 1);
189+
self._setScrollLeft(oldLeft + 1);
190+
self._setScrollTop(oldTop + 1);
190191

191-
self._setScrollLeft(oldLeft);
192-
self._setScrollTop(oldTop);
193-
}, 5);
192+
self._setScrollLeft(oldLeft);
193+
self._setScrollTop(oldTop);
194+
});
195+
}
194196
},
195197
_findParticles: function(){
196198
var self = this,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy