Closed ZacSweers closed 2 months ago
Hm very odd. I'll need to see if there's a new version of Monaco to update to to fix this?
Finally got around to trying this out, and nope — still occurs in the latest versions of Monaco Editor on Safari ... not sure what could be causing it -_-
ok did some debugging and I feel like it might be a WebKit thing:
e.g.
In here, I just pressed the f
key after a
and you can see that in the debugger for some reason, textArea.getValue()
returns
fun something() {
af }
instead of
fun something() {
af
}
(textArea
is just a wrapper on the HTML element <textarea>
)
Which leads to 1 weird way to workaround it: just make sure you are typing on the last line in Safari, and then there is no more \n
for WebKit to mix up 😂 .
I just updated to the latest monaco-editor
, would love if someone wants to see if this is still an issue :-/
@romannurik seems the same unfortunately
Gahhh.. another option is to just switch to CodeMirror. I may try that at some point soon.
Found the issue, it was with a quirk specific to SlidesCodeHighlighter and CSS styling.... lol. Fixed.
Not really sure what's going on but easy to reproduce. Only seems to happen in safari
https://user-images.githubusercontent.com/1361086/229913424-1460698b-3b7a-4507-9c37-4fa2aa6db214.mov