monaco-react icon indicating copy to clipboard operation
monaco-react copied to clipboard

Editor grows in size upon zoom, squeezing out other elements

Open peterje opened this issue 3 years ago • 3 comments

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:

  1. Go to the official demo page: https://monaco-react.surenatoyan.com/
  2. Zoom the page out to a minimum
  3. 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: image

Layout after following the above steps: image

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

peterje avatar Feb 18 '22 20:02 peterje

Confirmed that this happens when resizing the browser as well:

repro

It's like the editor doesn't shrink according to the container component's width.

morinokami avatar Feb 23 '22 08:02 morinokami

I wonder if any one found a solution for this problem

nimaa77 avatar Nov 24 '23 10:11 nimaa77

same problem here!

Wissperwind avatar Dec 08 '23 13:12 Wissperwind