document.addEventListener( "keydown" , function(event) { let {target, code} = event; if(target = target.closest(".body") && code == "Tab") event.preventDefault(); });