// Listen for shift-backspace or unmodified backspace and navigate if not in | |
// an editable field. | |
document.addEventListener('keydown', function(e) { | |
if (e.key === 'Backspace' && | |
!e.altKey && | |
!e.ctrlKey && | |
!e.metaKey && | |
!isEditable(e.path)) { | |
e.shiftKey ? window.history.forward(): window.history.back(); | |
e.preventDefault(); | |
} | |
}); |