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

Resize Codemirror instance when editor is resized #325

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DallasHoff
Copy link

This is a bug fix for the editor appearing broken after being resized. Currently when the Editor component is resized (such as when switching to fullscreen mode), the underlying Codemirror editor does not update to fit the new size. This means that elements in the editor are misaligned until the user types in it or performs some other action that causes Codemirror to recalculate the sizes. This PR adds a call to Codemirror's refresh method in the existing ResizeObserver so that when the editor is resized, the editor instantly updates its layout accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant