Tech Kraft

Documentum, AWS, Java, Ruby on Rails, Linux, Windows, App Servers


Javascript: How to detect which element has focus

If you are tabbing through a page and you seem to suddenly lose “focus”, that is, you are unable to determine which element has the focus currently, you can type the following in the console and tab back and forth. This code will print the the currently active element to the console:

document.addEventListener('keyup', function(){console.log(document.activeElement)})


Leave a comment

About Me

Senior Software Engineer professional with over 16 years of success with multiple open source technologies and various Content Management platforms and solutions.

Proven technical abilities through numerous projects involving enterprise web application design and development, application installation, configuration and support, and workflow and collaboration system designs.

  • Ability to learn new technologies and platforms quickly and apply them to the task at hand.
  • Excellent analytical skills, and strong communication and collaboration abilities.
  • Technical emphasis in including but not limited to Java, Ruby on Rails, Documentum and Alfresco
    in both Linux and Windows based environments

Newsletter