Notifications
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Horizontal scroll bar is out of view in some code blocks

+2
−0

If a code block has longer lines than will fit within the width of the code block, there is no indication that this is the case, nor any obvious way to scroll horizontally. For an example, see dig -6 works but dig -4 does not on Software Development.

Ideally, code blocks should have a horizontal scroll bar if (and only if) the content is wider than what is being displayed, just as they currently have a vertical scroll bar iff there are more lines than will fit vertically.

Here's what the above-linked question looks like to me, in part, in Firefox ESR 78.3:

Screenshot of part of the question

Another, possibly better, example that illustrates the same issue might be especially the first code block in the question connect with SLOT/SIGNAL: QPushButton clicked signal not received by main window, also on Software Development.

Why should this post be closed?

5 comments

Thanks for the screenshot. I'm not seeing it in Firefox 79.0 (or Chrome 84.0) but don't have ESR handy. There should definitely be a horizontal scrollbar there. ‭Monica Cellio‭ 18 days ago

@Monica Can't say this is exactly what @Canina is seeing, but I would say so given their screenshot. The scrollbar is there alright, but you have to scroll down to see it because of how the page is layed out. ‭Moshi‭ 18 days ago

There is a code element inside of a pre element. The code element has a horizontal scrollbar, while the pre element has a vertical scrollbar. This means that the horizontal scrollbar, as part of the inner code element, can be scrolled out of view. ‭Moshi‭ 18 days ago

@MonicaCellio What @Moshi wrote matches the rendering in my browser: there actually is a horizontal scroll bar, but I completely overlooked it because one has to scroll to the bottom of the embedded scrollable code to see it. If I overlook it, I can't imagine how confusing it might be for less technically savvy users. ‭Canina‭ 18 days ago

Yeah, if it's not visible from the start, we can't expect people to know about it. I see now -- this specific example is just short enough that the horizontal scroll is evident for me. But on https://software.codidact.com/questions/277881 the code block is longer and the scroll doesn't appear from the start. That might be a better example. ‭Monica Cellio‭ 18 days ago

0 answers

Sign up to answer this question »