Skip to content

Keep the scroll-to-bottom button above rich-text controls - #7178

Open
reece00 wants to merge 2 commits into
space-wizards:masterfrom
reece00:fix/output-panel-scroll-button-order
Open

reece00 wants to merge 2 commits into
space-wizards:masterfrom
reece00:fix/output-panel-scroll-button-order

Conversation

@reece00

@reece00 reece00 commented Nov 1, 2026

Copy link
Copy Markdown

Fixes clickable chat names covering the scroll-to-bottom button and intercepting clicks.

Overrides OutputPanel.ChildAdded to move the button to the end of the child list, keeping it above newly added rich-text controls for both rendering and mouse input.

Fixes space-wizards/space-station-14#46641.
Test:
image

@reece00
reece00 requested a review from DrSmugleaf as a code owner November 1, 2026 12:57

@Aeshus Aeshus left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This look good, as it does much the same as ScrollContainer does (which has similar layering issues). There may be a performance impact, but we already deal with it for ScrollContainer.

The only issue with your PR is that you also need to do the same for the _scrollBar, as that will also get potentially buried under richtext-generated controls.

This bug was only exposed because Content is using the richtext-generated controls a bunch more for the text links in chat.

For future work (out of scope of this bug fix), I think a better design would involve RichTextEntry putting the Controls it creates into a child container of OutputContainer, so it wouldn't have to change the ordering of its siblings constantly. Similar work could be done to ScrollContainer to fix this as well.

Co-authored-by: Thomas <87614336+Aeshus@users.noreply.github.com>
@reece00

reece00 commented Nov 2, 2026 •

Copy link
Copy Markdown
Author

A content container changes the parent-child hierarchy to handle stacking and would require checking code that relies on direct children.
A sibling ZIndex preserves the tree, but needs consistent ordering for rendering and hit-testing, with either repeated sorting or cache invalidation to manage.
I'm not familiar with the codebase. I haven't taken this any further.

@reece00
reece00 requested a review from Aeshus November 2, 2026 14:42

@Aeshus Aeshus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be good

@Aeshus Aeshus added T: Bugfix Type: Bugs and/or bugfixes A: UI Things like game screens, menus, and windows. labels Nov 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: UI Things like game screens, menus, and windows. T: Bugfix Type: Bugs and/or bugfixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clickable names render over&take priority over the 'scroll down' button in chat.

2 participants