matthewp / position--sticky-

Polyfill for position: sticky;
175 stars 34 forks source link

Race conditions? #18

Open stucox opened 10 years ago

stucox commented 10 years ago

Cheers for merging my other PR, but I actually switched to another lib in the end, because I found this had some race conditions and didn’t have time to resolve them :-/

Looks like sometimes in a live env, instances of position: sticky in stylesheets won’t be found?

matthewp commented 10 years ago

Yeah, this was written as a quick fix, how it got to 75 stars I have no idea. That's why I created #16 .

As far as this bug, what do you mean by a "live env"?

stucox commented 10 years ago

Live on a server: worked fine locally, but once I deployed it, it stopped working for some reason. All the files were still loading and they’re on the same domain, so my guess is that the CSS / JS files might have loaded in a different order… not sure if the load event waits for stylesheets?