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

updateExpansionAria called on wrong this #12128

Closed
henrikthuesen opened this issue Jun 17, 2024 · 1 comment · Fixed by #12129
Closed

updateExpansionAria called on wrong this #12128

henrikthuesen opened this issue Jun 17, 2024 · 1 comment · Fixed by #12129
Assignees
Labels
accessibility WCAG or ARIA related issues
Milestone

Comments

@henrikthuesen
Copy link
Contributor

Describe the bug

When using a data table with rowExpandMode="single" the collapseAllRows function in datatable.js is called and on line 3482 updateExpansionAria is called on this, but this is not the correct object. The correct this is captured on line 3472, so it should be $this instead.

The current implementation produces the following exception:

Uncaught TypeError: this.updateExpansionAria is not a function
    collapseAllRows components.js.xhtml:5641
    jQuery 2
    collapseAllRows components.js.xhtml:5634
    toggleExpansion components.js.xhtml:5518
    bindExpansionEvents components.js.xhtml:4190
    jQuery 8
    bindExpansionEvents components.js.xhtml:4184
    init components.js.xhtml:3446
    Class.extend/f[g]< core.js.xhtml:114
    d core.js.xhtml:114
    createWidget core.js.xhtml:26
    cw core.js.xhtml:26
    <anonymous> line 2 > injectedScript:1
    jQuery 6
    handle components.js.xhtml:509
    doUpdate core.js.xhtml:79
    handle core.js.xhtml:76
    onsuccess components.js.xhtml:502
    b core.js.xhtml:69
    jQuery 6
    send core.js.xhtml:68
    offer core.js.xhtml:57
    handle core.js.xhtml:58
    loadDynamicTab components.js.xhtml:521
    select components.js.xhtml:421
    bindEvents components.js.xhtml:368
    jQuery 8
    bindEvents components.js.xhtml:361
    init components.js.xhtml:321
    Class.extend/f[g]< core.js.xhtml:114
    d core.js.xhtml:114
    createWidget core.js.xhtml:26
    cw core.js.xhtml:26
    <anonymous> line 2 > injectedScript:1
    jQuery 3
    updateElement core.js.xhtml:56
    doUpdate core.js.xhtml:79
    handle core.js.xhtml:76
    b core.js.xhtml:70
    jQuery 6
    send core.js.xhtml:68
    offer core.js.xhtml:57
    handle core.js.xhtml:58
    ab core.js.xhtml:50
components.js.xhtml:5641:15

Reproducer

No response

Expected behavior

No response

PrimeFaces edition

None

PrimeFaces version

14.0.0

Theme

sage

JSF implementation

Mojarra

JSF version

4.0

Java version

17.0.10

Browser(s)

Firefox 127.0 macos

@henrikthuesen henrikthuesen added ‼️ needs-triage Issue needs triaging 🐞 defect Bug...Something isn't working labels Jun 17, 2024
henrikthuesen added a commit to henrikthuesen/primefaces that referenced this issue Jun 17, 2024
@melloware melloware added accessibility WCAG or ARIA related issues and removed 🐞 defect Bug...Something isn't working ‼️ needs-triage Issue needs triaging labels Jun 17, 2024
@melloware melloware added this to the 14.0.2 milestone Jun 17, 2024
@melloware
Copy link
Member

Thanks for the report and the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility WCAG or ARIA related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants