joplin
joplin copied to clipboard
Math expressions cause unnecessary horizontal scroll in rendered MD
Operating system
macOS
Joplin version
3.0.15
Desktop version info
Joplin 3.0.15 (prod, darwin)
Client ID: 11cb0a2d420047cd9119a44d443e827c Sync Version: 3 Profile Version: 47 Keychain Supported: Yes
Revision: 598677b
Backup: 1.4.1
Current behaviour
- Enable math expressions in Settings > Markdown
- Create an overflowing block element with horizontal scroll
- In that element, include a math expression, e.g.,
$a$
. (The bug occurs for many, but not all, possible placements of this math expression.) - With a narrow enough rendered markdown window, the viewer unnecessarily has horizontal scroll in addition to the overflowing element.
The bug appears to come from the absolute positioning of the span with class katex-mathml
(see attached screen recording). To use the provided test file, open it in Joplin via File > Import > MD - Markdown (File).
https://github.com/user-attachments/assets/90561433-3dff-4ed5-bbe3-8efc7849a10e test.md
Expected behaviour
The rendered markdown viewer should not horizontally scroll to a blank canvas. See the included screen recording, when the position: absolute;
rule is turned off on the offending span.
Logs
No response