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

flash detection throws an error in IE #1432

Closed
Aaike opened this issue Oct 3, 2014 · 4 comments · Fixed by #1469
Closed

flash detection throws an error in IE #1432

Aaike opened this issue Oct 3, 2014 · 4 comments · Fixed by #1469
Assignees

Comments

@Aaike
Copy link

Aaike commented Oct 3, 2014

The feature-detect/flash.js script throws an error in all version of IE.

this happens at lin 82 :
if (body.fake) {
body.parentNode.removeChild(body);
}

the error is : SCRIPT5007: Unable to get property 'removeChild' of undefined or null reference
this happens because the parentNode property is empty.

i've 'fixed' this in my local version like this :
if (body.fake && body.parentNode) {
body.parentNode.removeChild(body);
}

Although i think this is not the correct way to actually fix it...
just wanted to report the error and see if anybody knows how to correctly fix this issue.

ps: this is on the master branch

@patrickkettner
Copy link
Member

Hey @Aaike!
Super sorry you are having problems. I created this quick test case and wasn't able to blow up and of browserstacks IE browsers (tested 8-11).

Would you be able to share your code?

@Aaike
Copy link
Author

Aaike commented Oct 3, 2014

I just forked it and added a test :
https://rawgit.com/Aaike/Modernizr/master/test/build_test/test.html

If i check that in IE it throws the error.

The build was created by cloning the master branch and simply do the grunt build, without any changes to any files. The error also happens with the unminified file, which is also in the build_test directory.

@Aaike
Copy link
Author

Aaike commented Oct 3, 2014

So... by doing the "fix" i mentioned earlier i no longer have errors in IE 9 and 10 related to the flash test.
But i still got an error in IE8 :
SCRIPT5007: Unable to get property 'type' of undefined or null reference
File: modernizr-build.js, Line: 5869, Column: 9

Which seems to come from the feature-detects\img\webp.js at line 66
The 'event' has no 'type' property.

If i remove the webp test from the build then i have a build file that doesn't throw any errors in IE8-10

ps: These tests don't really matter to me so i just excluded them, i am good to go , just reporting the errors :)

@patrickkettner patrickkettner self-assigned this Oct 5, 2014
@niksy
Copy link
Contributor

niksy commented Dec 2, 2014

I also get this error when running test file which @Aaike provided. You need to have Flash installed on your browser to get this error.

patrickkettner added a commit to patrickkettner/Modernizr that referenced this issue Dec 7, 2014
patrickkettner added a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 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

Successfully merging a pull request may close this issue.

3 participants