I'm working on a site that prevents backspace in an input field by default, but for this particular input, I would like to return it to its default behaviors to accept backspace.
What is the simplest way to do this? Basically I need the opposite of preventDefault()
.
Update: I added the following message in the comment but thought it's important to the question. So here it is:
Unfortunately, I have no idea how it prevents the backspace. I'm creating a Chrome extension which injects an input field into the page. Everything works except the backspace. I tried to find the code where it prevents it but it's impossible.
My code to create the field is this:
if(!document.getElementById("input_typing")){
var input = document.createElement('input');
input.id = "input_typing";
input.tabIndex = 1;
input.style.width = "95%";
input.focus();
txts[i].parentNode.appendChild(input);
}