primefaces: InputMask: onchange broken with PF12
Describe the bug
inputMask in PF12 started to generate onchange events even if the value does not change. All that is enough is to click the component (focus gained) and click somewhere else (focus lost). This kills logic in my application which relies on reliably getting information if anything actually changes (inputMask used as filter with onchange script causing PF(‘dataTable’).filter()).
12.0.3:

11.0.9:

Reproducer
<h:body>
<p:log id="log" />
<h:form id="frmTest" prependId="false">
<p:inputMask id="testMask" widgetVar="testMask" value="#{testView.value}" mask="9999[ 9999]" onchange="PrimeFaces.info(jQuery('#testMask').val())"/>
</h:form>
</h:body>
Reproducer: primefaces-test-inputmask.zip
Expected behavior
No response
PrimeFaces edition
Elite
PrimeFaces version
12.0.3
Theme
No response
JSF implementation
Mojarra
JSF version
2.2
Java version
11
Browser(s)
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 29 (14 by maintainers)
Commits related to this issue
- Fix #9819: InputMask firing change without changes — committed to melloware/primefaces by melloware a year ago
- Fix #9819: InputMask firing change without changes — committed to melloware/primefaces by melloware a year ago
- Fix #9819: InputMask firing change without changes (#9821) — committed to primefaces/primefaces by melloware a year ago
Cool, I’ll continue reporting bugs found working with Elite version on this site, then. It’s not like I have choice to report it elsewhere 😃
Reported here: https://github.com/RobinHerbots/Inputmask/issues/2691
CodePen showing the issue in Raw jQuery InputMask: https://codepen.io/melloware/pen/rNZxXrN