Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SelectOneMenu: ESC does not close dialog #11369

Closed
melloware opened this issue Jan 31, 2024 · 0 comments · Fixed by #11371
Closed

SelectOneMenu: ESC does not close dialog #11369

melloware opened this issue Jan 31, 2024 · 0 comments · Fixed by #11371
Assignees
Labels
🐞 defect Bug...Something isn't working
Milestone

Comments

@melloware
Copy link
Member

melloware commented Jan 31, 2024

Discussed in https://github.com/orgs/primefaces/discussions/1062

Reported by @pierrefroy

Originally posted by pierrefroy January 30, 2024
Hi,

I'm trying to find the ause of a bug I'm getting on dialogs when the close on escape is not working. I can get the escape key to close dialogs by using this property: closeOnEscape="true". Except on some dialogs where it doesn't work for an obscure reason.

I used the browser console to see if there is a difference between working and non broken dialogs. What I'm seeing for now is that dialogs with broken escape are displaying errors for label when the label is applied to SelectOneMenu. Here is an example of such case.

The error message is : Incorrect use of <label for=FORM_ELEMENT>

<!-- SELECT FACILITY -->
<div class="field col-12 md:col-12">
    <p:outputLabel value="#{msg.Facility_label}"/>
    <p:message for="facility" display="text"/>
    <p:selectOneMenu id="facility" value="#{facilityController.selected}"
                     converter="omnifaces.SelectItemsConverter"
                     height="35vh">
        <p:ajax event="itemSelect"
                listener="#{faultController.onSelectFacility}"
                update="facilityLocation"/>
        <f:selectItems value="#{facilityController.itemsLookup}" var="facility"
                       itemLabel="#{facility.name}" itemValue="#{facility}"/>
        <f:facet name="footer">
            <h:outputFormat value="#{msg.Facility_count}"
                            style="font-weight:bold;" styleClass="block px-2 py-1 surface-200">
                <f:param value="#{facilityController.itemsLookup.size()}"/>
            </h:outputFormat>
        </f:facet>
    </p:selectOneMenu>
</div>

Thanks for your help.

Primefaces 13.0.5

Pierre

@melloware melloware changed the title Incorrect use of <label for=FORM_ELEMENT> on SelectOneMenu SelectOneMenu: ESC does not close dialog Jan 31, 2024
@melloware melloware transferred this issue from primefaces/community Jan 31, 2024
@melloware melloware added the 🐞 defect Bug...Something isn't working label Jan 31, 2024
melloware added a commit to melloware/primefaces that referenced this issue Jan 31, 2024
@melloware melloware self-assigned this Jan 31, 2024
@melloware melloware added this to the 13.0.6 milestone Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 defect Bug...Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant