yuanyan / halogen

A collection of loading spinners with React.js
https://yuanyan.github.io/halogen
MIT License
1.6k stars 151 forks source link

RiseLoader throws DomException on iOS (5) Safari #27

Open drywolf opened 8 years ago

drywolf commented 8 years ago

Hi,

I just found a small CSS typo that crashes halogen on iOS Safari. See the code below:

/**
 * @type {Object}
 */
var keyframesEven = {
    '0%': {
        transform: 'scale(1.1)'
    },
    '25': { // <----------------------- Percent sign missing (causes DOM exception)
        transform: 'translateY(-' + riseAmount + 'px)'
    },
    '50%': {
        transform: 'scale(0.4)'
    },
    '75%': {
        transform: 'translateY(' + riseAmount + 'px)'
    },
    '100%': {
        transform: 'translateY(0) scale(1.0)'
    }
};

/**
 * @type {Object}
 */
var keyframesOdd = {
    '0%': {
        transform: 'scale(0.4)'
    },
    '25': { // <----------------------- Percent sign missing (causes DOM exception)
        transform: 'translateY(' + riseAmount + 'px)'
    },
    '50%': {
        transform: 'scale(1.1)'
    },
    '75%': {
        transform: 'translateY(-' + riseAmount + 'px)'
    },
    '100%': {
        transform: 'translateY(0) scale(0.75)'
    }
};

Once I add the percent signs, the error is fixed.

Regards

kirillDanshin commented 7 years ago

hi. just FYI, it's fixed in halogenium, the maintained halogen fork. also #24 fixed too. rendering in chrome/opera/firefox fixed too.