After looking into this further, it appears it only occurs if the rl.question()
prompt contains a \n
. If the prompt doesn't contain a newline character, the text can be backspaced safely.
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.question('Please enter some text: ', function(answer){
rl.pause();
console.log(answer);
});