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

When editing content, pressing the delete key once will delete two characters #203

Open
4 tasks done
goozi opened this issue Jun 14, 2023 · 0 comments
Open
4 tasks done

Comments

@goozi
Copy link

goozi commented Jun 14, 2023

Describe the bug

<Codemirror class="code" v-model="editorValue" :autofocus="true" :extensions="extensions"
                    @change="handleClick('change', $event)" @longtap="copy"
                    @click="copy"/>

import {Codemirror} from "vue-codemirror";
import {markdown} from "@codemirror/lang-markdown";
import {oneDark} from "@codemirror/theme-one-dark";

My code, as shown above, works fine, but when I edit the markdown text, two characters are deleted every time I press the delete key, and the code does not report any errors. I checked long enough not to know exactly how it happened.

Reproduction

The code does not report errors

System Info

macbook 
node 16.20.0
vue:3.2.45

"codemirror": "^6.0.1",
"vue-codemirror": "^6.1.1",
"@codemirror/lang-markdown": "^6.1.1",
"@codemirror/theme-one-dark": "^6.1.2"

Used Package Manager

npm

Validations

  • Read the the documentation in detail.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant