When a user presses backspace in an HTML input it causes a back navigation. I'm able to disable this for inputs but not for selects in google chrome.
Here is an example. Try do do an backspace in the input and you see in the console that the event has been caught, try to select a value with the select and press backspace -> the browser navigates back, completely ignoring the javascript code.
For simplicity I'm just disabling all keys and logging it:
$(document).keydown(function(e){
e.preventDefault();
console.log(e.keyCode);
});
Is there any way to intercept the select keydown event when it's open?