Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adding comments
  • Loading branch information
lindsayevans committed Apr 23, 2012
1 parent af57e66 commit 70386fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions outline.js
@@ -1,8 +1,11 @@
// outline.js
// based on http://www.paciellogroup.com/blog/2012/04/how-to-remove-css-outlines-in-an-accessible-manner/
(function(d){

var style_element = d.createElement('STYLE');
d.getElementsByTagName('HEAD')[0].appendChild(style_element);

// Using mousedown instead of mouseover, so that previously focused elements don't lose focus ring on mouse move
d.onmousedown = function(){
style_element.innerHTML = 'a{outline:none}';
};
Expand Down

0 comments on commit 70386fb

Please sign in to comment.