I\'m trying to prevent backspace button to go one page back in every browser. For now I\'m using this code:
$(document).on(\"keydown\", function (e) {
if
You'll have to check for keydown event on $(select) right now, if you add
console.log(e.which)
console.log(e.target)
you'll notice that you won't get the keydown event when you click and press your keyboard while the select dropdown is active.
This will make it for your
$(document).on("keydown", $('select'), function (e) {
if (e.which === 8) {
e.preventDefault();
}
});