@vscode/markdown-editor 0.0.2-28 → 0.0.2-29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vscode/markdown-editor",
3
- "version": "0.0.2-28",
3
+ "version": "0.0.2-29",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -763,6 +763,20 @@ pre.md-unhandled-scroll.md-code-block {
763
763
  width: 2px;
764
764
  background: var(--md-cursor-background, #000);
765
765
  pointer-events: none;
766
+ }
767
+
768
+ /*
769
+ * The painted caret is only shown while the editor is genuinely focused — focus
770
+ * rests inside it and its window is focused, mirrored onto the root as
771
+ * `.md-focused`. When unfocused, hide the caret element but keep its layout box
772
+ * (so caret geometry, selection and comment anchoring are unchanged) and stop
773
+ * the blink. Adding the animation on focus restarts it from 0% (a solid caret).
774
+ */
775
+ .md-editor:not(.md-focused) .md-cursor {
776
+ visibility: hidden;
777
+ }
778
+
779
+ .md-editor.md-focused .md-cursor {
766
780
  animation: md-cursor-blink 1s step-end infinite;
767
781
  }
768
782