eclipse-ee4j / mojarra

Mojarra, a Jakarta Faces implementation
Other
165 stars 112 forks source link

f:ajax event blur on h:commandButton also fires action method #5488

Closed BalusC closed 2 months ago

BalusC commented 2 months ago

Reproducer (bean speaks for itself):

<h:form id="form">
    <h:inputText id="input" />
    <h:commandButton id="button" value="submit" action="#{bean.action}">
        <f:ajax event="blur" listener="#{bean.listener}" />
    </h:commandButton>
</h:form>

Use case:

Expected result:

Actual result:

Cause: Regression of https://github.com/eclipse-ee4j/mojarra/issues/3355. The associated PR https://github.com/javaee/mojarra/commit/4a8b275bb794433171d7a28b10a379b1149b67b4 shows that RenderKitUtils.isPartialOrBehaviorAction in wasClicked helper method was unintentionally skipped during the change.

cc: @volosied

BalusC commented 2 months ago

Noted should be that h:commandLink behaves as expected.