Skip to content

Commit

Permalink
Add a selector for .cm-content to caret-hiding style
Browse files Browse the repository at this point in the history
FIX: Work around an issue on Safari on macOS Sonoma that made the native
cursor visible even when `drawSelection` is enabled.

Closes #59
  • Loading branch information
marijnh committed Nov 10, 2023
1 parent 9c062aa commit df237c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/draw-selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,5 @@ const themeSpec = {
"&::selection": {backgroundColor: "transparent !important"}
}
}
if (CanHidePrimary) (themeSpec as any)[".cm-line"].caretColor = "transparent !important"
if (CanHidePrimary) (themeSpec as any)[".cm-content, .cm-line"].caretColor = "transparent !important"
const hideNativeSelection = Prec.highest(EditorView.theme(themeSpec))

0 comments on commit df237c8

Please sign in to comment.