I'm encountering a strange issue where an onkeyup event prevents an ajax event from being executed in IE.
<p:inputText id="mileage" value="#{quoteInput.mileage}" styleClass="imedium required" required="true" disabled="#{quoteRequest.quoteDisabled}" onkeyup="typePosReal(this)">
<f:ajax execute="@this" render="@this"/>
<mw:convertDouble locale="#{ws.numberFormatLocale}" minFractionDigits="2" maxFractionDigits="2"/>
</p:inputText>
In the above snippet, removing the onkeyup="typePosReal(this)"
fragment makes things work again, but then I'm losing my javascript functionality.
This is with JSF2.0 and PrimeFaces4. Any ideas what to do here?
EDIT
The JS function modifies the value of the input text (sometimes)
function typePosReal(field) {
field.value = (decimalsep == ',') ?
field.value.replace(/\./, ',') : field.value.replace(/\,/, '.');
field.value = field.value.replace(/[^0-9\.,]+/g, ''); return true;
}
Commenting out the lines the modify the field's value makes the ajax work correctly in IE...