Toggle sidebar might not work with latest Gin 8.x-3.0-rc11

Created on 19 June 2024, 8 days ago

Problem/Motivation

Since Gin 8.x-3.0-rc11 - Gin theme added a tooltip after the sidebar toggle and changed the related JS. Under some circumstances sidebar toggle no longer works and produces a JS error:

TypeError: null is not an object (evaluating 'sidebarTrigger.nextSibling.innerHTML=hideLabel')

The reason that is does not break for everyone is the following: whitespaces creates text nodes in DOM and by default template has a lot of whitespaces.

But when there is no whitespaces - no text nodes are being created (there is no tooltip element as well) -> JS error is emitted (see https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/W...)

Steps to reproduce

  1. Remove whitespaces in templates or install & configure Minify Source HTML module
  2. Sidebar toggle does not work anymore

Proposed resolution

Add a tooltip (actually only a class is needed)

Remaining tasks

Review PR

User interface changes

Sidebar UI will match recent changes in Gin theme

API changes

None

Data model changes

None

πŸ“Œ Task
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine Taran2L Lviv

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024