exo
exo copied to clipboard
[BUG] Monaco editor text selection squishes whitespace
Describe the bug Monaco editor text selection squishes whitespace in a very unexpected and annoying way. For some reason this feels infuriating, and I haven't yet been able to figure out why it happens. It causes the text to "jump" around when you select it.
To Reproduce Steps to reproduce the behavior:
- Go to a page with a Monaco editor, e.g. "New Process"
- Type a script that has indented lines (in my case 4 spaces indent)
- Select the text
Expected behavior The whitespace in the editor should not change when text is selected
Screenshots
System Info
- OS: Windows/WSL/Chrome
Do we know if maybe one of our global or inherited stylesheet rules is causing the issue?
No clue, but somehow I can no longer reproduce this - it seems fixed, but I didn't change anything.
OK, then let's close this until it comes up again.
Even when I was able to produce this bug, I was unable to identify any reason for the issue beyond the final visual result, despite digging through the DOM and stylesheets.
Okay, it is not fixed. Just happened again.
Notably this has only been seen in the dev version so far. When I started up the dev version, it was working fine, at some point after making modifications to the page component the text editor was a child of, the bug came back. The bug persisted across all Monaco editors until I closed that browser window and opened a new one, after which it was fixed again.
Same thing just happened, this time all I had changed was some inline CSS in the svelte <style>
block of the parent component.
My current theory is that this bug is at some point triggered by the hot reloading of the app during development.
Is this still happening? And is it still a dev-time only issue?
If it is dev only, is it annoying? If so, we can try to fix it together. Otherwise, we can probably ignore this.
@brandonbloom yes - it is still happening, and yes so far only in dev. It's kinda annoying but not really because I barely need to use the Monaco editor for more than a few seconds in dev. Wouldn't allocate any time to fixing this until it shows up in prod (for now)