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

No cursor when the content is empty #201

Open
4 tasks done
Kasheftin opened this issue Jun 8, 2023 · 0 comments
Open
4 tasks done

No cursor when the content is empty #201

Kasheftin opened this issue Jun 8, 2023 · 0 comments

Comments

@Kasheftin
Copy link

Kasheftin commented Jun 8, 2023

Describe the bug

There's no blinking cursor when the content is empty & editor is focused.
There's something wrong with the .cm-cursor div height, it's zero.
Here's the trivial source code and the repro, https://github.com/Kasheftin/codemirror-no-cursor-bug.
The top line is a raw codemirror v6.0.1, it works fine, if you focus the editor, a blinking blue cursor appears.
The second line is vue-codemirror v6.1.1 using the same codemirror v6.0.1 under the hood. If the content is empty, and you focus the editor, there's no blinking blue cursor shown.

I added this as an issue for codemirror initially, codemirror/dev#1177, but since the raw codemirror works correctly, it means the reason is vue-codemirror wrapper.

Reproduction

https://kasheftin.github.io/codemirror-no-cursor-bug/

  • Focus on the top line
  • Blinking blue cursor is shown
  • Focus on the second line
  • Blinking blue cursor is not shown

System Info

Ubuntu, Chrome Version 113.0.5672.126 (Official Build) (64-bit)
Codemirror v6.0.1
vue-codemirror v6.1.1

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