Code sample:
<h:inputText id="field" type="text" value="#{bean.field}"> <a4j:support event="onchange" action="#{bean.enableBtn}" reRender="btn" ajaxSingle="true" /> <a4j:support event="onkeyup" action="#{bean.enableBtn}" reRender="btn" requestDelay="1000" ajaxSingle="true" /> </h:inputText> <a4j:commandButton id="btn" value="Submit" action="#{bean.action}" disabled="#{!bean.btnEnabled}" />
Initially 'btn' button is disabled. Whenever user fills field with the correct data button is enabled. We use RF 3.3.3.
The problem with this sample page is that immediately after button is enabled (i.e. ~200ms after DOM update) onclick event just doesn't fire in webkit browsers and IE. I checked it with chrome's "Event Listener Breakpoint" for the onclick event.
It looks like the following happens:
If I set requestDelay="200" for the onchange event - immediate click works fine, but I have a nasty feeling that after 200ms button will hit this "onclick blind spot" again.
Nothing relevant found in RF's JIRA so far, but could it be a known bug? Are there any alternative ways to implement described behavior? Any additional recommendations?
Thanks,
Vadim Dmitriev.