vue-codemirror
vue-codemirror copied to clipboard
When editing content, pressing the delete key once will delete two characters
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
- [X] Read the the documentation in detail.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.