Hiding the toc_js block not working when minimum elements is not respected with custom css

Created on 9 August 2023, 11 months ago
Updated 21 September 2023, 9 months ago

Problem/Motivation

We use some custom styling using display: flex on the class, however it seems that this breaks the hiding of the element when the minimum elements are not reached.

Steps to reproduce

Install the module
Configure toc_js with 'minimum elements' set to 1 for a content-type
Add custom css with

.toc_js {
    display: flex;
}

The element will not be hidden when no items are found.

Proposed resolution

See patch. Note that this causes the block to be visible for a couple of ms.

Remaining tasks

Review or propose another resolution.

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium leanderjcc Ghent

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

Comments & Activities

Production build 0.69.0 2024