CSS3-Snowflakes icon indicating copy to clipboard operation
CSS3-Snowflakes copied to clipboard

Does not work in Firefox

Open apbarratt opened this issue 11 years ago • 3 comments

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.

apbarratt avatar Nov 02 '14 14:11 apbarratt

@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.

dmolsen avatar Nov 04 '14 17:11 dmolsen

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: https://github.com/jlongster/css-animations.js/commit/bedeff09f1e716f8fab5879d385397b0e511ad77

toabi avatar Nov 20 '14 15:11 toabi

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

toabi avatar Nov 21 '14 10:11 toabi