Notice while on Google\'s homepage, with no focus on any element, pressing BACKSPACE will put the focus into the search toolbar instead of navigating back.
How can I
Handled readonly text boxes also
$(document).keydown(function (e) { var activeInput = $(document.activeElement).is("input[type=text]:not([readonly]):focus, textarea:focus"); if (e.keyCode === 8 && !activeInput) { return false; }; });