Closed silverwind closed 2 years ago
Could not reproduce, can you give some more information like browser, OS and record a video of it?
Firefox 98 on macOS 12. It appears to be a Firefox-only issue, can not reproduce in Chrome. Here's how it looks, I enter the character, then attempt to select via click and drag:
Safari 15 also shows the bug.
Looks like it's a macOS issue then. Even on Firefox I could not reproduce it.
That underline under the character, what does it mean? It might mean that is has not actually 'typed' the character yet, because ` is usually used as a dead key (needs Space to be typed.)
I'm seeing the same behaviour here: https://medium.com/@scr34mz/make-your-mac-keyboard-work-on-medium-and-others-editors-without-dead-keys-issues-french-keyboard-4666b72fa2ae
So what I gather from that article is that the ` with the underline in your video isn't real input yet, but it does become real once you hit Space, then the selection should work as normal.
Might be related to the combinator input behaviour of the backtick, but the deletion on selection is still unexpected and does not happen in a <textarea>
. I use backticks a lot in markdown and often leave "unresolved" ones open while I try to edit other text and any kind of selection action in the document destroys test between start point of the selection and that "unresolved" backtick.
Here's another example with text before the backtick and selection starting on that text:
Can you try the same on https://codemirror.net/ and https://codemirror.net/6/ for me?
This might help narrow it down.
Happens in https://codemirror.net/mode/markdown/index.html too, so it seems it's a CodeMirror bug. Report there?
Yeah, please do.
I'm not sure if they'll fix the bug in v5 since v6 is around the corner (I hope 😅), but having the bug registered is a good thing anyway.
CodeMirror 5.65.8 is released with this fixed.
Awesome! I'll made an update with that version included :)
You don't actually have to because semver range ^5.60.4
matches the new version already :)
Describe the bug When backtick characters are present, the editor will unexpectedly delete text during selection.
To Reproduce Steps to reproduce the behavior:
`
character into editorExpected behavior Text should never be deleted during selection