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

el.currentStyle is null or undefined on ie8 for node: <param> #259

Closed
jgabios opened this issue Nov 3, 2014 · 3 comments
Closed

el.currentStyle is null or undefined on ie8 for node: <param> #259

jgabios opened this issue Nov 3, 2014 · 3 comments
Milestone

Comments

@jgabios
Copy link

jgabios commented Nov 3, 2014

When I try to select a chunk of html with a hidden[display:none] movie in it [soundmanager2's swf], it gives me:
el.currentStyle is null or undefined
on ie8.
As a quick workaround I did this:

        var getComputedStyleProperty;
        if (typeof window.getComputedStyle != UNDEF) {
            getComputedStyleProperty = function(el, propName) {
                return getWindow(el).getComputedStyle(el, null)[propName];
            };
        } else if (typeof document.documentElement.currentStyle != UNDEF) {
            getComputedStyleProperty = function(el, propName) {
                if(el.currentStyle) {
                return el.currentStyle[propName];
            } else {
                return null;
                }
            };

But I am not sure if returning something else instead of null would be better?

@timdown timdown added this to the 1.3 milestone Mar 23, 2015
@timdown
Copy link
Owner

timdown commented Mar 23, 2015

Sorry to have taken so long to get to this. I will fix it in the next few days.

@timdown
Copy link
Owner

timdown commented Mar 25, 2015

I'm struggling to replicate this. Could you give me some pointers? I'll try again tomorrow anyway.

timdown pushed a commit that referenced this issue Apr 5, 2015
@timdown
Copy link
Owner

timdown commented Apr 5, 2015

I couldn't replicate it but I added a null check anyway so it shouldn't happen again.

@timdown timdown closed this as completed Apr 5, 2015
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

2 participants