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

Issue fork gin_lb-3455800

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Taran2L created an issue. See original summary.

taran2l’s picture

Status: Active » Needs review
grimreaper’s picture

Assigned: Unassigned » grimreaper
grimreaper’s picture

Assigned: grimreaper » Unassigned

I have not tested with the minified HTML.

I now see the tooltip.

I have added a commit to raise minimum Gin version.

grimreaper’s picture

Status: Needs review » Fixed

  • Grimreaper committed 2596827d on 1.0.x authored by Taran2L
    Issue #3455800 by Taran2L, Grimreaper: Support toggle sidebar tooltip.
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.