Table Header JS Bug with ".gin-table-scroll-wrapper"
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3340941. --> Reported by: [nuuou](https://www.drupal.org/user/3398102) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Sticky table headers seem to break on various admin pages, with JS errors coming from the Gin module.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <ul> <li>Standard Drupal installation (Core 9.4.11, also tested with 9.4.10)</li> <li>Install Gin, Gin Toolbar, default Gin settings for toolbar and density (Gin at 8.3.0-rc1)</li> <li>Visit the <code>/admin/people/permissions</code> page (this also seems to happen on Webform listing page too, tested on a separate site)</li> <li>Notice a JS console error:<br> <pre>Uncaught TypeError: Cannot read properties of null (reading 'classList')<br>&nbsp;&nbsp;&nbsp; at IntersectionObserver.threshold</pre><ul> <li>Comes from the <code>themes/contrib/gin/js/overrides/tableheader.js</code> file</li> </ul> </li> </ul> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>It looks like the <code>.gin-table-scroll-wrapper</code> doesn't exist as an element on the page at all, so the querySelector call returns null.<br> Not sure how this element is meant to be injected!</p> > Related issue: [Issue #3338209](https://www.drupal.org/node/3338209) > Related issue: [Issue #3323501](https://www.drupal.org/node/3323501)
issue