Drop-down-visible class persists even when drop down is not visible anymore

Discourse adds the class drop-down-visible to the <body> element when a drop-down is visible.

Screenshots here on meta:

No drop down:

drop down visible (hamburger menu):

This is a very handy class, but isn’t it supposed to be removed when the drop-down is no longer visible?

Here’s a screenshot after closing the hamburger menu above:

Note that the class drop-down-visible is still present.


The same happens with the notification drop-down and the search drop-down.

3 Likes

That does seem odd @eviltrout we must not need this class?

3 Likes

This class could probably use a better name. drop-down-visible indicates whether the header will use a dropdown vs the docked format of the navigation (generally with a smaller browser width.) It is currently being used.

6 Likes

I suggest we rename it, then?

4 Likes

Should do it.

4 Likes