Originally published at: Get Active Element with JavaScript - Server Side Up
Recently, I’ve been working on AmplitudeJS 6.0. One of the features of Amplitude is to bind key events to certain methods. A simple feature with one caveat. If you bind the key press events to the page, but the user is in a form field, the event will still fire. This is un-wanted behavior. Luckily…