monaco-react
monaco-react copied to clipboard
Editor grows in size upon zoom, squeezing out other elements
Describe the bug When you zoom out a page that contains Monaco, then zoom back into 100%, the original layout is corrupted as the Monaco editor does not scale back down to the original width.
To Reproduce
Steps to reproduce the behavior:
- Go to the official demo page: https://monaco-react.surenatoyan.com/
- Zoom the page out to a minimum
- Zoom the page into 100%
The side panel on the right side will now overflow off-screen.
Expected behavior The layout should persist after zoom operations.
Screenshots
Original layout:
Layout after following the above steps:
Notice the horizontal scrollbar and the disappearance of the sidebar.
Desktop (please complete the following information):
- OS: Windows 11
- Browser: Chrome
- Version: 98.0.4758.102
Confirmed that this happens when resizing the browser as well:
It's like the editor doesn't shrink according to the container component's width.
I wonder if any one found a solution for this problem
same problem here!