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
- Remove whitespaces in templates or install & configure Minify Source HTML module
- 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
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
Comment #3
taran2lComment #4
grimreaperComment #5
grimreaperI have not tested with the minified HTML.
I now see the tooltip.
I have added a commit to raise minimum Gin version.
Comment #6
grimreaper