sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.16k stars 211 forks source link

Bug report: possible issue with switching between files in the latex editor #6093

Open stumpc5 opened 2 years ago

stumpc5 commented 2 years ago

(This concerns the CoCalc@RUB version and might be already fixed. I tried to reproduce this bug on cocalc.com, but it did not show up. I will report back after we have upgraded the CoCalc version on our servers.)

I have a tex project with one master file with ~20 tex and bib files imported. In this case, you provide a dropdown with all imported files to work with the project.

Sometime (maybe 10-30% of the times), when I choose a different file in the project via this dropdown menu, the content of the editor does not change from the previous file. And the newly chosen file's content is overwritten by the other file's content.

So: I have FileA.tex open in the dropdown. I change to FileB.tex via the dropdown. The dropdown now shows FileB.tex, but the text editor still shows the content of FileA.tex. The content of FileB.tex is now overwritten by the content of FileA.tex.

I then have to open FileB.tex in a second tab and go to the previous version using the time travel, and overwrite the content with the previous version.

williamstein commented 2 years ago

I do think it is likely this is fixed already, since it involves state in the react codemirror component, which we had recently worked on.

stumpc5 commented 2 years ago

Some more details that I just realized: