Skip to content

Content Drive: pagination buttons stay enabled while a page is loading, allowing duplicate requests #37212

Closed

Description

@dario-daza

Problem Statement

The Content Drive pagination controls (next/previous page) remain clickable while a page request is already in flight. Clicking them again before the current request resolves fires additional, redundant requests for the same navigation action.

Steps to Reproduce

Video: content drive pagination buttons.mov

  1. In Content Drive, navigate to a folder/search result with multiple pages.
  2. Click the "next page" (or "previous page") button while the current page is still loading.
  3. Click it again (or multiple times) before the request completes.
  4. Observe multiple network requests fired, one per click, instead of the click being ignored/debounced while a request is in flight.

Expected vs Actual

Expected: pagination controls should be disabled (or clicks ignored) while a page request is in progress, so only one request is made per navigation action.

Actual: pagination buttons remain enabled during loading; repeated clicks fire additional requests.

Acceptance Criteria

  • Pagination controls are disabled (or non-interactive) while a page request is in flight
  • Rapidly clicking a pagination control while loading results in exactly one request, not one per click
  • No regression to normal pagination behavior once a request completes

Parent Epic

#36814

Activity

  1. added theissue type on Aug 25, 2026
  2. moved this from New to In Review in dotCMS - Product Planningon Sep 11, 2026
  3. removed their assignment
    on Sep 14, 2026
  4. moved this from QA to Current Sprint Backlog in dotCMS - Product Planningon Sep 18, 2026
  5. 8 remaining items

  6. rjvelazco commented on Sep 21, 2026

    @rjvelazco
    Member

    QA re-test after #37630: still reproducible — the lockout never reaches the DOM

    @ihoffmann-dot the guard logic in #37630 is right, but the CSS lockout it relies on is never applied by PrimeNG, so the original repro is unchanged: clicking Previous while a page is loading still navigates.

    Evidence — rendered dot-folder-list-view with loading: true, offset: 20, 25 items, and read the actual DOM:

    what value
    $ptConfig().paginator.class (computed) pointer-events-none opacity-60 ✅
    .p-paginator class in the DOM p-component p-paginator ❌
    .p-paginator-prev → disabled false ❌
    .p-paginator-next → disabled false ❌

    Root cause — two things, both in $ptConfig (libs/ui/src/lib/components/dot-folder-list-view/dot-folder-list-view.component.ts:624):

    1. The pt section key for a Table's paginator in PrimeNG 21 is pcPaginator, not paginator — see [pt]="ptm('pcPaginator')" in primeng/fesm2022/primeng-table.mjs:3110. An unrecognized pt key is silently ignored.
    2. A child component's pt object takes sections, so a bare top-level class matches nothing either. It has to go under root.

    Suggested fix — the PrimeNG way. Instead of leaning on pointer-events-none, set the buttons' real disabled through pt sections. I verified this end-to-end against a p-table in this repo's PrimeNG 21.1.3: the root class lands, and prev/next come back with disabled === true (pt's pBind wins over the paginator's own [disabled]="isFirstPage() || empty()").

    const locked = this.$loading() || this.#pageChangeAccepted();
    
    return {
        pcPaginator: {
            root: { class: locked ? 'opacity-60' : '' },
            prev: { disabled: locked || undefined },
            next: { disabled: locked || undefined },
            // the rows-per-page dropdown fires a fetch of its own
            pcRowPerPageDropdown: { disabled: locked || undefined }
        },
        // ...
    };

    A real disabled also fixes the two side effects pointer-events-none can't: keyboard activation still reached the button (CSS doesn't stop Enter), and screen readers still announced the controls as enabled.

    Why CI stayed green — the specs assert the computed object, never the rendered DOM: expect(spectator.component.$ptConfig().paginator.class).toContain('pointer-events-none') (dot-folder-list-view.component.spec.ts:714, :748). That passes regardless of what PrimeNG does with the object. Worth re-pointing those at spectator.query('.p-paginator-prev').disabled so this class of bug can't pass again.

    Leaving QA : Failed on this. Happy to pair on it if useful.

    🤖 Investigated and drafted by Claude on behalf of @rjvelazco

  7. removed their assignment
    on Sep 21, 2026
  8. moved this from QA to Current Sprint Backlog in dotCMS - Product Planningon Sep 21, 2026
  9. self-assigned this
    on Sep 22, 2026
  10. moved this from Current Sprint Backlog to QA in dotCMS - Product Planningon Sep 22, 2026
  11. removed their assignment
    on Sep 22, 2026
  12. rjvelazco commented on Sep 22, 2026

    @rjvelazco
    Member

    Passed QA

    • dotCMS Docker Image: [dotcms/dotcms:trunk_]

    Video

    video.mov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions