Hello Dominique,
I was testing your input box and by the moment I could not fix your bug. However I've improved functionality, cause If you want delete some characters from input, you cannot use the Backspace.
For more information, please check my code (https://jsfiddle.net/8hrngu0v/6/)