Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Side-by-side preview pane rendering with the incorrect height #583

Open
RaceProUK opened this issue Mar 6, 2024 · 0 comments
Open

Side-by-side preview pane rendering with the incorrect height #583

RaceProUK opened this issue Mar 6, 2024 · 0 comments
Labels

Comments

@RaceProUK
Copy link

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.

@RaceProUK RaceProUK added the Bug label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant