Skip to content
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

Does not work in Firefox #7

Open
apbarratt opened this issue Nov 2, 2014 · 3 comments
Open

Does not work in Firefox #7

apbarratt opened this issue Nov 2, 2014 · 3 comments

Comments

@apbarratt
Copy link

Hi guys,

The description and example site state that this works in Firefox though it seems that this is not the case. Perhaps an update to Firefox?

Tested and working in latest versions of Chrome, Safari and Opera.
Not working in latest versions of Internet Explorer (no surprises there) and Firefox.

@dmolsen
Copy link
Owner

dmolsen commented Nov 4, 2014

@apbarratt -

Thanks :) I honestly haven't played around with this for years though I guess it should work regardless. Maybe I'll poke around and see if I can update it with the holidays coming up.

@toabi
Copy link
Contributor

toabi commented Nov 20, 2014

Jeah. It does not work in FF because of:

TypeError: keyframes.insertRule is not a function

Snowflakes.prototype.updateKeyframeHeight = function() {
    if (keyframes = this.findKeyframeAnimation("falling")) {
        var height      = this.pageContainer.offsetHeight;
        if ((window.innerHeight) > height) {
            height      = window.innerHeight;
        }
        if (keyframes.cssText.match(new RegExp('webkit'))) {
            var newRule = "100% { -webkit-transform: translate3d(0,"+height+"px,0) rotate(360deg); }";
        } else if (keyframes.cssText.match(new RegExp('moz'))) {
            var newRule = "-moz-transform: translate(0,"+height+"px) rotate(360deg);";
        }
        keyframes.insertRule(newRule);
    }
}

I fond another project where this once was an issue: jlongster/css-animations.js@bedeff0

@toabi
Copy link
Contributor

toabi commented Nov 21, 2014

Jo, so I had a few Minutes and added Firefox compatibility in #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants