Table Header JS Bug with ".gin-table-scroll-wrapper"

Created on 10 February 2023, about 2 years ago

Problem/Motivation

Sticky table headers seem to break on various admin pages, with JS errors coming from the Gin module.

Steps to reproduce

  • Standard Drupal installation (Core 9.4.11, also tested with 9.4.10)
  • Install Gin, Gin Toolbar, default Gin settings for toolbar and density (Gin at 8.3.0-rc1)
  • Visit the /admin/people/permissions page (this also seems to happen on Webform listing page too, tested on a separate site)
  • Notice a JS console error:
    Uncaught TypeError: Cannot read properties of null (reading 'classList')
        at IntersectionObserver.threshold
    • Comes from the themes/contrib/gin/js/overrides/tableheader.js file

Proposed resolution

It looks like the .gin-table-scroll-wrapper doesn't exist as an element on the page at all, so the querySelector call returns null.
Not sure how this element is meant to be injected!

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Nuuou Lincoln, NE

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024