Select-kit obscured by post body

(Boost) #1

I’ve been trying to fix an issue on an discourse instance I’m hosting ( with the post category changer (the select-kit widget) being behind the post content. This is caused by my custom css and/or the theme (because another forum I’m hosting with the default theme doesn’t have this issue).
Here’s a screenshot of the issue:

I tried shoving z-index: 300; position: absolute just about to any css class that had select-kit in its name and I just could not make it appear correctly. The only somewhat working thing I found in dev tools was that by removing all the z-index styles from posts and avatars the dropdown showed up correctly, but those are discourse inbuilt ones and my theme doesn’t add extra z-index (it did at some point but I think I removed it) so I don’t want to do that.

If there are any css wizards here i’d appreciate help here as I’m out of things to try with my limited css knowledge.

(Joffrey Jaffeux) #2

You probably are using a theme or some custom css, no reproduction on meta:

(Penar Musaraj) #3

I signed up on your site, @Boost, but I can’t see where I can trigger the screen you posted. Please describe how you got to that screen.

(Kris) #4

Increasing the z-index on topic-title might do the trick, try

#topic-title {
   z-index: 5;

(Daniela) #5

I signed up too, and the problem is more serious than expected using Firefox

with this JS error:

(note that when the dev console is opened all start to work again)

Every time you try to add a category the page disappears and you need to do an hard refresh.
In safe-mode everything works normally

(Joffrey Jaffeux) #6

Also can’t reproduce on master, there’s however a warning that I will fix.

(Boost) #7

I was using that as a solution before. But the “post admin actions” menu goes behind the title of the topic. So so far there’s been two possible choices: either the select-kit popups are behind the posts or the post admin menu is behind the title of the topic.

(Kris) #8

Ah I see, that’s hard to do anything about because the title area and the posts are in two separate stacking contexts. Setting the post admin menu z-index higher/lower won’t do anything because the post’s parent container z-index is lower than the title’s.

By default we have #topic-title and .topic-body set to the same z-index. Not sure why the theme changed that.

(Boost) #9

That seems to have only started today when I updated to v2.2.0.beta2 +136

(Joffrey Jaffeux) #10

Yes might be something with FIX: don't send multiple requests when changing category notification… · discourse/discourse@1add11d · GitHub

Will have a look tomorrow

(Boost) #11

I tried doing that again with:

    z-index: 3;

That should be the same index as the post. But still it appeared behind it.
If I set the z-index to 4 on the topic-tittle then the select-kit popups are over the posts, but then once again the post admin menu is behind the title.

(Kris) #12

Hmm… yeah that’s odd. I’m not seeing anything else obvious that could be causing it.

I wonder if the order that the CSS is being applied is causing an issue? If you completely remove those two z-index values added in the theme, does that change anything?

(Boost) #13

When I don’t have any z-index on the topic title or the post set in the theme then it displays just like in my first screenshot. There are a few z-index things related to the background and top bar still in the theme but I hope they don’t mess with the stacking order related to this issue.

I would try updating the theme our theme is based on (GitHub - hnb-ku/discourse-vincent-theme: v0.77) but as we have directly edited the css without playing around with theme components it’s going to take quite a bit of work to separate our customizations out of it.

(Boost) #14

I think I may have identified what caused the issue with the theme:

/*#main-outlet > div.regular {
	display: flex;
	flex-direction: column;

When I commented out that everything seemed to be fine.

So I guess that that caused the topic title to be forced into a stacking context and then the children of it couldn’t escape from that context with any trick.

(Boost) #15

I just updated my discourse to version v2.2.0.beta2 +310 and there is still the issue that with firefox it is not possible to select the category for a new topic.

Should I create a bug report for this or is it already being taken care of?

(system) #16

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.