carta icon indicating copy to clipboard operation
carta copied to clipboard

Dont conditionally render input on tab change

Open Specy opened this issue 1 year ago • 0 comments

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)

Specy avatar Aug 11 '24 13:08 Specy