Last active
December 25, 2015 16:49
-
-
Save usmonster/7009049 to your computer and use it in GitHub Desktop.
The CSS rule `outline:none;` causes IE8 to barf when accessing a target element's `.currentStyle["outline"]` (or `.currentStyle["outlineWidth"]`). Fun! If you must, use instead `outline:0;` or `outline:none 0;`. (But really, [just avoid it](http://www.outlinenone.com), okay?) (Note: this is fine when in a newer IE version but in "IE8 Standards m…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="X-UA-Compatible" content="IE=Edge" /> | |
<meta charset="utf-8" /> | |
<title>title</title> | |
</head> | |
<body> | |
<div id="foo" style="outline:none;">Test</div> | |
<script language="javascript" type="text/javascript"> | |
var div = document.getElementById('foo'); | |
var cs = div.currentStyle; | |
//debugger; | |
var asplode = cs["outline"]; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
JSBin here: http://jsbin.com/oWaseco/1/edit?html,output