Ionaru / Ionaru/easy-markdown-editor
Side-by-side preview pane rendering with the incorrect height
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 363
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When using a maximum height in units other than pixels, the side-by-side preview pane is rendered incorrectly, typically ending up much shorter than it should be.
**To Reproduce**
Steps to reproduce the behavior:
1. Set `maxHeight` to a non-pixel value e.g. `40rem`
2. Enable side-by-side without fullscreen
**Expected behavior**
The preview pane should be the same height as the editor pane.
**Version information**
- OS: Windows
- Browser: Chrome 122
- EasyMDE version: 2.18.0
**Additional context**
This issue doesn't occur when using fullscreen mode.
The trigger appears to be https://github.com/Ionaru/easy-markdown-editor/blob/master/src/js/easymde.js#L2555, as it's the only place where `options.maxHeight` is wrapped in `parseInt()`, causing the unit to be discarded.
Contributor guide
Assessment
This issue has not been assessed yet.