Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very Weird and Annoying Behavior of Messing up Pasted Text in Markdown Mode Editor #15624

Closed
firezym opened this issue Jan 10, 2024 · 6 comments
Labels
bug status:Duplicate status:Needs Triage Applied to new issues that need triage

Comments

@firezym
Copy link

firezym commented Jan 10, 2024

Description

When I copy Ctrl+C & paste Ctrl+V some long text with some markdown formats into the editor in markdown mode , there is a very great chance of messing up the text for display. The executed display and text content in the editor is inconsistant. Also Ctrl+Z to reverse editing has a high prob to break. You can see the actual difference if you switch between markdown and code mode. The behavior is very strange and annoying because I rely on the markdown to edit and when this happens, the original text can not be recovered completely.

markdown-editor-error

Reproduce

Try to copy some long texts (especially markdown texts) into the editor in markdwon mode, as the gif shows. You can copy below texts as the gif:

```
aaaaaaaaaaaa
bbbbbbbbbbbb
cccccccccccc
dddddddddddd
eeeeeeeeeeee
```

Expected behavior

Texts are messed up and can not be recovered. The executed display and text content in the editor is inconsistant.

Context

  • Operating System and version: Windows 10/11 for Chrome Frontend
  • Browser and version: Chrome 120.0.6099.130 and also the latest official version of Chrome.
  • JupyterLab version: 4.0.10 via official pip install, Tried Windows and Linux for Backend
jupyter_client            8.6.0
jupyter_core              5.7.1
jupyter-events            0.9.0
jupyter-lsp               2.2.1
jupyter_server            2.12.3
jupyter_server_terminals  0.5.1
jupyterlab                4.0.10
jupyterlab_pygments       0.3.0
jupyterlab_server         2.25.2
@firezym firezym added the bug label Jan 10, 2024
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Jan 10, 2024
@firezym
Copy link
Author

firezym commented Jan 12, 2024

To add up, I also tried to copy these test texts from browser/vscode/notepad/word, it all cause the messed up texts. But If I try to copy it from the jupyterlab text editor in markdown/code mode to markdown cell, the texts will be fine.
```
aaaaaaaaaaaa
bbbbbbbbbbbb
cccccccccccc
dddddddddddd
eeeeeeeeeeee
```

@firezym
Copy link
Author

firezym commented Jan 12, 2024

@krassowski can you validate the above bug? Recently I am working a lot the markdown mode, it is really annying >..<
Could it be a bug involving CodeMirror?

@krassowski
Copy link
Member

At a quick glance this looks like a duplicate of:

@firezym
Copy link
Author

firezym commented Jan 12, 2024

Yep, it looks related. I have that kind of error too, invisible results for markdown output. But I did not make that error gif.

@firezym
Copy link
Author

firezym commented Jan 12, 2024

I rely a lot on the markdown. But when the markdown is corrupted, I will need to create a new cell. But that will change the unique id of the cell, which I am using it for cross note book refencing. That's why I need the markdown cell to be stable for copy/paste editing...

@JasonWeill
Copy link
Contributor

Closing as duplicate of #14752; let's keep the conversation going in the older issue. Thanks @firezym !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status:Duplicate status:Needs Triage Applied to new issues that need triage
Projects
None yet
Development

No branches or pull requests

3 participants