My problem is that I added a keyup event on my input
<input type="tel" name="phone" id="phone" onkeyup="javascript:doPhoneChanged(this);" style="width: 220px;"/>

When I modify my phone number, the "doPhoneChanged" method is called but if I change the phone prefix by selecting a new flag nothing happens. Adding the keyup solves this problem