How to stop horizontal scrolling in inline math blocks #5010
why scroll bars are showing for inline math blocks? and how to stop it....This is very bad UX. |
Replies: 2 comments
|
Thanks for the report. This is already handled on the current develop branch. The inline math renderer keeps KaTeX content on one line, but the math popup now has a bounded width and horizontal overflow enabled: https://github.com/marktext/marktext/blob/develop/packages/muya/src/assets/styles/inlineSyntax.css There is also a regression test for this exact case: This is intentional: a long formula is allowed to scroll inside the math popup so it does not make the whole editor wider. If you are seeing the scrollbar on an older build, updating to a build containing that change should fix the editor-wide overflow. Removing overflow would only clip the formula. A wrap-within-the-popup option would be a separate renderer/design change. |
|
I'm using |

Thanks for the report. This is already handled on the current develop branch.
The inline math renderer keeps KaTeX content on one line, but the math popup now has a bounded width and horizontal overflow enabled:
https://github.com/marktext/marktext/blob/develop/packages/muya/src/assets/styles/inlineSyntax.css
There is also a regression test for this exact case:
https://github.com/marktext/marktext/blob/develop/packages/muya/e2e/tests/blocks/inline-math-overflow-4339.spec.ts
This is intentional: a long formula is allowed to scroll inside the math popup so it does not make the whole editor wider. If you are seeing the scrollbar on an older build, updating to a build containing that change s…