According to my tests with Chrome:
If you set the input number to a number, then it works fine.
If you set the input number to a string that contains only a number, then it works fine.
If you set the input number to a string containing a number and some spaces, it will close the input.
You probably have a space or a new line after the data in the server response that you really like.
Use document.getElementById("points").value = parseInt(request.responseText, 10); instead of this.
Quentin
source share