Comment 1 for bug 1280004

Revision history for this message
Jono M (jonom) wrote :

One way to do this would be something like (in jQuery):

$(function() {
  var focusfunction = function(e) {
    if (e.keyCode == 9) {
      $('body').addClass('showfocus');
      document.removeEventListener('keydown', focusfunction);
    }
  }
  document.addEventListener('keydown', focusfunction, true);
}

And only have focus styles applied under .showfocus (alternatively this could be reversed so the body has a class of hidefocus by default)