fix(ui): prevent double vertical scrollbars in latex math rendering#2967
Open
Siddhu2k04 wants to merge 1 commit into
Open
fix(ui): prevent double vertical scrollbars in latex math rendering#2967Siddhu2k04 wants to merge 1 commit into
Siddhu2k04 wants to merge 1 commit into
Conversation
Co-Authored-By: Antigravity <[email protected]>
Author
|
Hi @asvishnyakov and @sandangel, I've submitted a fix for #2949 and verified that it resolves the duplicate vertical scrollbar issue when LaTeX rendering is enabled. Could you please review the PR when you have a chance? Any feedback is appreciated. Thanks! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix duplicate vertical scrollbar when LaTeX rendering is enabled
Summary
This PR fixes an issue where enabling
latex=trueinconfig.tomlcould cause two vertical scrollbars to appear in the chat UI when rendering LaTeX content.Root Cause
The chat interface already provides a scrollable container for messages. When LaTeX content is rendered, the math wrapper may introduce additional overflow behavior, creating a nested scroll container and resulting in duplicate vertical scrollbars.
Changes
Removed unnecessary vertical overflow handling from LaTeX rendering containers.
Restricted LaTeX elements to horizontal scrolling only when needed.
Ensured the main chat container remains the sole vertical scroll region.
Preserved existing LaTeX rendering behavior and layout.
Before
latex=trueenabled.Sending multiple messages containing LaTeX equations eventually displays two vertical scrollbars.
After
Only one vertical scrollbar is displayed.
LaTeX equations render correctly.
Normal chat scrolling behavior remains unchanged.
Testing
Reproduction Steps
Enable
latex=trueinconfig.toml.Run the following application:
Start Chainlit.
Send messages multiple times until the chat becomes scrollable.
Results
References
Fixes UI displays two vertical scrollbars with enabled latex rendering #2949
Related to UI displays two vertical scrollbars whenever a custom element is rendered #2003