"element.firstChild is null"
The affected line is inside getSelectedValue():
How to reproduce:
2) Hit enter quickly. When you hit it before the Ajax response arrives, the error occurs.
It is because the preselect sets selected=0, before sending the Ajax request.
It should be kept to -1 until the response arrives.
I'm going to attach a short patch for this.