vue-codemirror icon indicating copy to clipboard operation
vue-codemirror copied to clipboard

Rendering issue

Open rogeralsing opened this issue 5 years ago • 7 comments

I'm having some bad rendering going on in my app.

Opening the editor shows code like so. Here all text is selected, and the selection is completely off, it is not aligned to the actual text.

Skärmavbild 2020-01-05 kl  12 37 49

In this next image, the browser window is resized and the selection size is now correct. But, there are still some form of error with the gutter/linenumbers compared to the content, see how the first column of text is hidden behind the gutter.

Skärmavbild 2020-01-05 kl  12 38 28

Is there some known issues and fixes for this? If it matters, the editor is hosted inside a Vuetify based app.

if not, I will try to recreate a reproduction for this.

rogeralsing avatar Jan 05 '20 11:01 rogeralsing

I had same issue in Vuetify based app. I fixed it rearranging css files. Reason is that when you import themes and addons it adds css files after your main css file. I move main css file in a body tag and now it works. don't know why is this happening but clearly it's a css bug

uchm4n avatar Mar 09 '20 07:03 uchm4n

I had same issue in Vuetify based app. I fixed it rearranging css files. Reason is that when you import themes and addons it adds css files after your main css file. I move main css file in a body tag and now it works. don't know why is this happening but clearly it's a css bug

Hello @uC137 i am using vuetify too, i had an issue, in my web i must click the editor to show the code. Did you have same problem? if not, can you help me? before click image

after click image

esa89 avatar Apr 01 '20 07:04 esa89

you could use css preload <link rel="preload">
https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content

uchm4n avatar Apr 01 '20 17:04 uchm4n

I'm working on a Vuetify based Electron app, and facing the same problem. image

skyzhao1223 avatar Jul 16 '20 08:07 skyzhao1223

I have the same problems as described above. Using CodeMirror + Vuetify. Any workarounds would be helpful.

floydqwz avatar Feb 02 '21 15:02 floydqwz

Anyone still having this issue might be able to fix it by setting the fixedGutter property to false (it true by default)

topeysoft avatar Feb 24 '21 20:02 topeysoft

仍然有此问题的任何人都可以通过将fixedGutter属性设置为false(默认情况下为 true)来修复它

Yes, but why

bitbw avatar Sep 06 '22 07:09 bitbw