bind backspace key to back button

This commit is contained in:
nklhrstv 2020-02-12 10:59:55 +02:00
parent 292f4d59c6
commit 9871e438e8

View file

@ -12,6 +12,14 @@ function KeyboardNavigation() {
if (tab) {
event.preventDefault();
window.location = tab.href;
return;
}
if (event.target.tag !== 'INPUT') {
if (event.key === 'Backspace') {
window.history.back();
return;
}
}
}
function start() {