Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your 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.

Comments on Horizontal scroll bar is out of view in some code blocks

Post

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.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

General comments (5 comments)
General comments

Skipping 2 deleted comments.

Monica Cellio‭ wrote about 4 years ago

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.

Moshi‭ wrote about 4 years 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‭ wrote about 4 years 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.

Canina‭ wrote about 4 years 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.

Monica Cellio‭ wrote about 4 years ago · edited about 4 years 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.