Ensure sidebarTrigger.nextSibling is not null when showing/hiding toolbar

Created on 10 July 2024, 6 months ago
Updated 12 September 2024, 4 months ago

Problem/Motivation

For modules inheriting gin theme's sidebar.js, there may not be an immediate nextSibling available (i.e. .gin-tooltip) to trigger change to the innerHTML. When aggregation is turned on especially, this causes the main sidebar functionality to break given that the nextSibling is null.

Steps to reproduce

Use something like v.1.0-rc7 of https://www.drupal.org/project/gin_lb β†’ . When in layout mode, partial failure comes from the innerHTML of the next sibling not being available.

Proposed resolution

Add a simple conditional around setting sidebarTrigger.nextSibling.innerHTML by checking if sidebarTrigger.nextSibling exists first.

πŸ› Bug report
Status

Fixed

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jv24

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024