-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transition:none in Chrome/Safari #231
Comments
Seams like the script ran too early (on document.ready). |
@jlmakes Sorry for bringing this up from the dead, but I just experienced this weird issue. My When I have: import { throttle } from "lodash";
import ScrollReveal from "scrollreveal";
// Reveals on scroll
const sr = ScrollReveal();
sr.reveal(".js-foo", {
delay: 5000,
easing: "ease-in"
}); I get the following:
The only way I can make this work correctly is by wrapping it onload: import { throttle } from "lodash";
import ScrollReveal from "scrollreveal";
// Reveals on scroll
window.addEventListener("load", () => {
const sr = ScrollReveal();
sr.reveal(".js-foo", {
easing: "ease-in"
});
}); Since everything is at the bottom, just before I also confirm it works on Firefox (Mac), with or without Maybe it's caused by a big vendor js payload? Because I can't duplicate it in a JSFiddle Thanks! |
The default transition property varies across browsers. According to the tests I ran, there were 4 possible values. See my comments in the source: scrollreveal/src/instance/functions/style.js Lines 173 to 182 in 66f44ab
I don't recall what browser each value corresponds to, but a cursory check suggests that WebKit based browsers (such as Chrome and Safari) use Why that value would be That said, it would seem there's reason to include that case in the regex, e.g: - !transition.computed.match(/all 0s/)
+ !transition.computed.match(/all 0s|none 0s/) Is that something you can test @allaire ? |
Hi @jlmakes, your fix does work! Now everything works as expected. The only difference versus using Found some resources on Google about 75lb/transition-to-from-auto#5 From the tests above, it seems that when |
Cool links, thanks. The Chromium source is especially interesting! This suggests that somehow Weird :D In any case, I've added the fix and released |
Awesome @jlmakes, thanks for the great work and support. 🍻 |
While firefox and IE work, in Chrome and Safari
transition:none
is set.The js should be fine (?):
The text was updated successfully, but these errors were encountered: