blob: cf3a2991ed644ed2418b24028d3b15d046c37470 [file] [log] [blame]
// Listen for the backspace key and go back if not in an editable field.
document.addEventListener('keydown', function(e) {
if (e.which === 8 && // backspace key code
!isEditable(e.path)) {
window.history.back();
e.preventDefault();
}
});