carta
carta copied to clipboard
Dont conditionally render input on tab change
Trying out the editor when switching to/from the write and preview, going back to Write, the syntax highlight for the editor flickers because it is getting mounted conditionally when the tab is selected. It makes sense to conditionally render the markdown content as it could lag while typing, but the input should always be rendered, just kept hidden (display:none)
https://github.com/BearToCode/carta/blob/1a15159e41e7de7432c645db11f7793d27dcf61d/packages/carta-md/src/lib/MarkdownEditor.svelte#L170
Here it should just toggle display none on a wrapper element (or Input itself)